TAChart: Update dragdrop demo to use TDataPointHintTool with the modifier key

git-svn-id: trunk@37210 -
This commit is contained in:
ask 2012-05-07 07:39:35 +00:00
parent c0db15a654
commit 28475d565d
3 changed files with 11 additions and 3 deletions

View File

@ -54,13 +54,14 @@
<Filename Value="main.pas"/> <Filename Value="main.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/> <ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="Main"/> <UnitName Value="Main"/>
</Unit1> </Unit1>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="10"/> <Version Value="11"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>

View File

@ -3,12 +3,13 @@ object Form1: TForm1
Height = 481 Height = 481
Top = 180 Top = 180
Width = 483 Width = 483
ActiveControl = Chart1
Caption = 'Form1' Caption = 'Form1'
ClientHeight = 481 ClientHeight = 481
ClientWidth = 483 ClientWidth = 483
OnCreate = FormCreate OnCreate = FormCreate
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '0.9.31' LCLVersion = '1.1'
object Chart1: TChart object Chart1: TChart
Left = 0 Left = 0
Height = 447 Height = 447
@ -25,11 +26,16 @@ object Form1: TForm1
end> end>
Foot.Brush.Color = clBtnFace Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue Foot.Font.Color = clBlue
Margins.Left = 8
Margins.Top = 8
Margins.Right = 8
Margins.Bottom = 8
Title.Brush.Color = clBtnFace Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue Title.Font.Color = clBlue
Title.Text.Strings = ( Title.Text.Strings = (
'Drag data points while holding Shift key' 'Drag data points while holding Shift key'
'Change point color by right-click' 'Change point color by right-click'
'Show hint while holding ctrl key'
) )
Title.Visible = True Title.Visible = True
Toolset = ChartToolset1 Toolset = ChartToolset1
@ -82,7 +88,7 @@ object Form1: TForm1
OnPointClick = ChartToolset1DataPointClickTool1PointClick OnPointClick = ChartToolset1DataPointClickTool1PointClick
end end
object ChartToolset1DataPointHintTool1: TDataPointHintTool object ChartToolset1DataPointHintTool1: TDataPointHintTool
Shift = [] Shift = [ssCtrl]
GrabRadius = 10 GrabRadius = 10
ActiveCursor = crHandPoint ActiveCursor = crHandPoint
OnHint = ChartToolset1DataPointHintTool1Hint OnHint = ChartToolset1DataPointHintTool1Hint

View File

@ -46,6 +46,7 @@ uses
procedure TForm1.cbSortedChange(Sender: TObject); procedure TForm1.cbSortedChange(Sender: TObject);
begin begin
Chart1LineSeries1.ListSource.Sorted := cbSorted.Checked; Chart1LineSeries1.ListSource.Sorted := cbSorted.Checked;
Chart1.SetFocus;
end; end;
procedure TForm1.Chart1LineSeries1GetMark( procedure TForm1.Chart1LineSeries1GetMark(