mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:16:13 +02:00
added TBarChar demo
git-svn-id: trunk@6066 -
This commit is contained in:
parent
e48907bdf1
commit
879f1ff11a
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -439,6 +439,11 @@ examples/address_book/mybook.dbf svneol=native#unset
|
||||
examples/address_book/mybook.mdx svneol=native#unset
|
||||
examples/address_book/mybook2.dbf svneol=native#unset
|
||||
examples/address_book/mybook2.mdx svneol=native#unset
|
||||
examples/barchart/chartdemo.lpi svneol=native#text/plain
|
||||
examples/barchart/chartdemo.lpr svneol=native#text/pascal
|
||||
examples/barchart/frmmain.lfm svneol=native#text/plain
|
||||
examples/barchart/frmmain.lrs svneol=native#text/pascal
|
||||
examples/barchart/frmmain.pas svneol=native#text/pascal
|
||||
examples/bitbtnform.pp svneol=native#text/pascal
|
||||
examples/bitbutton.pp svneol=native#text/pascal
|
||||
examples/checkbox.pp svneol=native#text/pascal
|
||||
|
68
examples/barchart/chartdemo.lpi
Normal file
68
examples/barchart/chartdemo.lpi
Normal file
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="4"/>
|
||||
<General>
|
||||
<ProjectType Value="Application"/>
|
||||
<Flags>
|
||||
<SaveClosedFiles Value="False"/>
|
||||
<SaveOnlyProjectUnits Value="True"/>
|
||||
</Flags>
|
||||
<MainUnit Value="0"/>
|
||||
<ActiveEditorIndexAtStart Value="1"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<Title Value="chartdemo"/>
|
||||
</General>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="chartdemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="chartdemo"/>
|
||||
<UsageCount Value="20"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<CursorPos X="71" Y="8"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<Filename Value="frmmain.pas"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<Loaded Value="True"/>
|
||||
<ResourceFilename Value="frmmain.lrs"/>
|
||||
<TopLine Value="1"/>
|
||||
<UnitName Value="frmmain"/>
|
||||
<UsageCount Value="20"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="2"/>
|
||||
<SearchPaths>
|
||||
<SrcPath Value="$(LazarusDir)/lcl/;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)/"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
14
examples/barchart/chartdemo.lpr
Normal file
14
examples/barchart/chartdemo.lpr
Normal file
@ -0,0 +1,14 @@
|
||||
program chartdemo;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
Interfaces,
|
||||
Forms, frmmain;
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
25
examples/barchart/frmmain.lfm
Normal file
25
examples/barchart/frmmain.lfm
Normal file
@ -0,0 +1,25 @@
|
||||
object Form1: TForm1
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
OnShow = Form1Show
|
||||
PixelsPerInch = 90
|
||||
HorzScrollBar.Page = 401
|
||||
VertScrollBar.Page = 301
|
||||
Left = 440
|
||||
Height = 300
|
||||
Top = 209
|
||||
Width = 400
|
||||
object BarChart1: TBarChart
|
||||
Depth = 20
|
||||
Caption = 'My Data'
|
||||
ClientHeight = 256
|
||||
ClientWidth = 368
|
||||
FullRepaint = False
|
||||
TabOrder = 0
|
||||
Left = 16
|
||||
Height = 256
|
||||
Top = 16
|
||||
Width = 368
|
||||
end
|
||||
end
|
11
examples/barchart/frmmain.lrs
Normal file
11
examples/barchart/frmmain.lrs
Normal file
@ -0,0 +1,11 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#7'Caption'#6#5'Form1'#12'ClientHeight'#3','#1#11'Cl'
|
||||
+'ientWidth'#3#144#1#6'OnShow'#7#9'Form1Show'#13'PixelsPerInch'#2'Z'#18'HorzS'
|
||||
+'crollBar.Page'#3#145#1#18'VertScrollBar.Page'#3'-'#1#4'Left'#3#184#1#6'Heig'
|
||||
+'ht'#3','#1#3'Top'#3#209#0#5'Width'#3#144#1#0#9'TBarChart'#9'BarChart1'#5'De'
|
||||
+'pth'#2#20#7'Caption'#6#7'My Data'#12'ClientHeight'#3#0#1#11'ClientWidth'#3
|
||||
+'p'#1#11'FullRepaint'#8#8'TabOrder'#2#0#4'Left'#2#16#6'Height'#3#0#1#3'Top'#2
|
||||
+#16#5'Width'#3'p'#1#0#0#0
|
||||
]);
|
40
examples/barchart/frmmain.pas
Normal file
40
examples/barchart/frmmain.pas
Normal file
@ -0,0 +1,40 @@
|
||||
unit frmmain;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, chart;
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
BarChart1: TBarChart;
|
||||
procedure Form1Show(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.Form1Show(Sender: TObject);
|
||||
begin
|
||||
BarChart1.AddBar('1999',200,clGreen);
|
||||
BarChart1.AddBar('2000',100,clred);
|
||||
BarChart1.AddBar('2001',300,clred);
|
||||
BarChart1.AddBar('2003',400,clGreen);
|
||||
BarChart1.AddBar('2004',400,clGreen);
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I frmmain.lrs}
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user