mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 18:19:37 +02:00
TAChart: Update listbox demo
git-svn-id: trunk@31668 -
This commit is contained in:
parent
92fec404bd
commit
8c1941aa19
@ -35,9 +35,6 @@ object Form1: TForm1
|
||||
Title.Caption = 'x axis'
|
||||
end>
|
||||
BackColor = clWhite
|
||||
Extent.XMax = 10
|
||||
Extent.UseXMin = True
|
||||
Extent.UseXMax = True
|
||||
Foot.Brush.Color = clBtnFace
|
||||
Foot.Font.Color = clBlue
|
||||
Title.Brush.Color = clBtnFace
|
||||
@ -46,6 +43,7 @@ object Form1: TForm1
|
||||
'TAChart'
|
||||
)
|
||||
Align = alClient
|
||||
DoubleBuffered = True
|
||||
ParentColor = False
|
||||
object SinSeries: TLineSeries
|
||||
Title = 'sin(x)'
|
||||
@ -111,6 +109,7 @@ object Form1: TForm1
|
||||
OnAddSeries = ChartListboxAddSeries
|
||||
OnCheckboxClick = ChartListboxCheckboxClick
|
||||
OnItemClick = ChartListboxItemClick
|
||||
OnPopulate = ChartListboxPopulate
|
||||
OnSeriesIconDblClick = ChartListboxSeriesIconDblClick
|
||||
Align = alClient
|
||||
ItemHeight = 0
|
||||
@ -262,6 +261,15 @@ object Form1: TForm1
|
||||
Width = 278
|
||||
Shape = bsBottomLine
|
||||
end
|
||||
object BtnAddPoint: TButton
|
||||
Left = 209
|
||||
Height = 25
|
||||
Top = 12
|
||||
Width = 75
|
||||
Caption = 'Add point'
|
||||
OnClick = BtnAddPointClick
|
||||
TabOrder = 11
|
||||
end
|
||||
end
|
||||
object RandomChartSource: TRandomChartSource
|
||||
PointsNumber = 10
|
||||
|
@ -20,6 +20,7 @@ type
|
||||
BtnToggleCOS: TButton;
|
||||
BtnToggleChart: TButton;
|
||||
BtnToggleSIN: TButton;
|
||||
BtnAddPoint: TButton;
|
||||
Chart: TChart;
|
||||
CbShowCheckboxes: TCheckBox;
|
||||
CbShowSeriesIcon: TCheckBox;
|
||||
@ -44,6 +45,7 @@ type
|
||||
procedure BtnToggleCOSClick(Sender: TObject);
|
||||
procedure BtnToggleChartClick(Sender: TObject);
|
||||
procedure BtnToggleSINClick(Sender: TObject);
|
||||
procedure BtnAddPointClick(Sender: TObject);
|
||||
procedure CbShowCheckboxesChange(Sender: TObject);
|
||||
procedure CbShowSeriesIconChange(Sender: TObject);
|
||||
procedure CbCheckStyleChange(Sender: TObject);
|
||||
@ -51,6 +53,7 @@ type
|
||||
procedure ChartListboxAddSeries(ASender: TChartListbox;
|
||||
ASeries: TCustomChartSeries; AItems: TChartLegendItems;
|
||||
var ASkip: Boolean);
|
||||
procedure ChartListboxPopulate(Sender: TObject);
|
||||
procedure EdColumnsChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ChartListboxCheckboxClick(Sender: TObject; Index: Integer);
|
||||
@ -114,6 +117,11 @@ begin
|
||||
[Index, ChartListbox.Series[Index].Title]));
|
||||
end;
|
||||
|
||||
procedure TForm1.ChartListboxPopulate(Sender: TObject);
|
||||
begin
|
||||
Memo.Lines.Add('Populate');
|
||||
end;
|
||||
|
||||
procedure TForm1.ChartListboxClick(Sender: TObject);
|
||||
begin
|
||||
with ChartListbox do
|
||||
@ -132,6 +140,11 @@ begin
|
||||
SinSeries.Active := not SinSeries.Active;
|
||||
end;
|
||||
|
||||
procedure TForm1.BtnAddPointClick(Sender: TObject);
|
||||
begin
|
||||
SinSeries.Add(Random(5), '', clRed);
|
||||
end;
|
||||
|
||||
procedure TForm1.CbShowCheckboxesChange(Sender: TObject);
|
||||
begin
|
||||
with ChartListbox do
|
||||
|
Loading…
Reference in New Issue
Block a user