TAChart: Update TChartListbox after change of OnPopulate event

git-svn-id: trunk@31640 -
This commit is contained in:
ask 2011-07-10 06:14:11 +00:00
parent 40e5b784e4
commit e08abac28c

View File

@ -63,6 +63,7 @@ type
procedure SetChart(AValue: TChart);
procedure SetChecked(AIndex: Integer; AValue: Boolean);
procedure SetCheckStyle(AValue: TCheckBoxesStyle);
procedure SetOnPopulate(AValue: TNotifyEvent);
procedure SetShowCheckboxes(AValue: Boolean);
procedure SetShowSeriesIcons(AValue: Boolean);
@ -109,7 +110,7 @@ type
read FOnCheckboxClick write FOnCheckboxClick;
property OnItemClick: TChartListboxIndexEvent
read FOnItemClick write FOnItemClick;
property OnPopulate: TNotifyEvent read FOnPopulate write FOnPopulate;
property OnPopulate: TNotifyEvent read FOnPopulate write SetOnPopulate;
property OnSeriesIconClick: TChartListboxIndexEvent
read FOnSeriesIconClick write FOnSeriesIconClick;
published
@ -535,7 +536,7 @@ begin
end;
end;
procedure TChartlistbox.SetCheckStyle(AValue: TCheckBoxesStyle);
procedure TChartListbox.SetCheckStyle(AValue: TCheckBoxesStyle);
{ selects "checkbox" or "radiobutton" styles. In radiobutton mode, only
one series can be visible }
var
@ -551,6 +552,13 @@ begin
Invalidate;
end;
procedure TChartListbox.SetOnPopulate(AValue: TNotifyEvent);
begin
if TMethod(FOnPopulate) = TMethod(AValue) then exit;
FOnPopulate := AValue;
Populate;
end;
procedure TChartListbox.SetShowCheckboxes(AValue: Boolean);
begin
if FShowCheckboxes = AValue then exit;