diff --git a/components/tachart/demo/listbox/Unit1.lfm b/components/tachart/demo/listbox/Unit1.lfm index 54feae5ff4..9083f40ba4 100644 --- a/components/tachart/demo/listbox/Unit1.lfm +++ b/components/tachart/demo/listbox/Unit1.lfm @@ -110,7 +110,7 @@ object Form1: TForm1 Chart = Chart OnCheckboxClick = ChartListboxCheckboxClick OnItemClick = ChartListboxItemClick - OnSeriesIconClick = ChartListboxSeriesIconClick + OnSeriesIconDblClick = ChartListboxSeriesIconDblClick Align = alClient ItemHeight = 0 TabOrder = 2 diff --git a/components/tachart/demo/listbox/Unit1.pas b/components/tachart/demo/listbox/Unit1.pas index 27e11a8cb4..c27c7b1bf7 100644 --- a/components/tachart/demo/listbox/Unit1.pas +++ b/components/tachart/demo/listbox/Unit1.pas @@ -53,7 +53,7 @@ type procedure ChartListboxCheckboxClick(Sender: TObject; Index: Integer); procedure ChartListboxClick(Sender: TObject); procedure ChartListboxItemClick(Sender: TObject; Index: Integer); - procedure ChartListboxSeriesIconClick(Sender: TObject; Index: Integer); + procedure ChartListboxSeriesIconDblClick(Sender: TObject; Index: Integer); procedure ChartListboxPopulate(Sender: TObject); private procedure CreateData; @@ -93,7 +93,7 @@ begin [Index, ChartListbox.Series[Index].Title])); end; -procedure TForm1.ChartListboxSeriesIconClick(Sender: TObject; Index: Integer); +procedure TForm1.ChartListboxSeriesIconDblClick(Sender: TObject; Index: Integer); begin Memo.Lines.Add(Format('Icon of item #%d (series "%s") clicked.', [Index, ChartListbox.Series[Index].Title])); diff --git a/components/tachart/tachartlistbox.pas b/components/tachart/tachartlistbox.pas index 5bd924cbff..09affc0d12 100644 --- a/components/tachart/tachartlistbox.pas +++ b/components/tachart/tachartlistbox.pas @@ -58,7 +58,7 @@ type FOnCheckboxClick: TChartListboxIndexEvent; FOnItemClick: TChartListboxIndexEvent; FOnPopulate: TNotifyEvent; - FOnSeriesIconClick: TChartListboxIndexEvent; + FOnSeriesIconDblClick: TChartListboxIndexEvent; FOptions: TChartListOptions; FSeriesIconClicked: Integer; function GetChecked(AIndex: Integer): Boolean; @@ -114,8 +114,8 @@ type property OnItemClick: TChartListboxIndexEvent read FOnItemClick write FOnItemClick; property OnPopulate: TNotifyEvent read FOnPopulate write SetOnPopulate; - property OnSeriesIconClick: TChartListboxIndexEvent - read FOnSeriesIconClick write FOnSeriesIconClick; + property OnSeriesIconDblClick: TChartListboxIndexEvent + read FOnSeriesIconDblClick write FOnSeriesIconDblClick; published property Align; // property AllowGrayed; @@ -244,8 +244,8 @@ end; procedure TChartListbox.ClickedSeriesIcon(AIndex: Integer); begin - if Assigned(OnSeriesIconClick) then - OnSeriesIconClick(Self, AIndex); + if Assigned(OnSeriesIconDblClick) then + OnSeriesIconDblClick(Self, AIndex); end; function TChartListbox.CreateLegendItems: TChartLegendItems;