TAChart: Use TZoomDragTool.RatioLimit in tools demo and line demo

git-svn-id: trunk@29677 -
This commit is contained in:
ask 2011-02-27 03:02:14 +00:00
parent 10ae7cdbb1
commit 90a4b20d3e
3 changed files with 9 additions and 6 deletions

View File

@ -7,15 +7,15 @@ object Form1: TForm1
ClientHeight = 479
ClientWidth = 589
Position = poScreenCenter
LCLVersion = '0.9.29'
LCLVersion = '0.9.31'
object PageControl2: TPageControl
Left = 0
Height = 479
Top = 0
Width = 589
ActivePage = tsStats
ActivePage = tsFast
Align = alClient
TabIndex = 1
TabIndex = 0
TabOrder = 0
object tsFast: TTabSheet
Caption = 'Fast drawing'
@ -54,7 +54,6 @@ object Form1: TForm1
Pen.Color = clAqua
Pen.Width = 2
Position = 0
SeriesColor = clAqua
ZPosition = 1
end
end
@ -219,6 +218,7 @@ object Form1: TForm1
end
object ChartToolset1ZoomDragTool1: TZoomDragTool
Shift = [ssShift, ssLeft]
RatioLimit = zrlFixedY
end
object ChartToolset1PanDragTool1: TPanDragTool
Shift = [ssRight]

View File

@ -54,7 +54,7 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="9"/>
<Version Value="10"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="linedemo"/>

View File

@ -111,7 +111,10 @@ var
begin
b := rgZoom.ItemIndex <= 1;
ChartToolset1ZoomDragTool1.Enabled := b;
ChartToolset1ZoomDragTool1.Proportional := rgZoom.ItemIndex = 1;
if rgZoom.ItemIndex = 1 then
ChartToolset1ZoomDragTool1.RatioLimit := zrlProportional
else
ChartToolset1ZoomDragTool1.RatioLimit := zrlNone;
ChartToolset1ZoomIn.Enabled := not b;
ChartToolset1ZoomOut.Enabled := not b;
end;