Example projects tested, categorised, metadata added, restructured by David Bannon.
5
examples/Beginner/bitbtn/bitbtn.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "bitbtn" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["TBitBtn"],
|
||||
"Description" : "Demonstrates TBitBtn, a button with a bitmap image."}
|
||||
}
|
5
examples/Beginner/combobox/combobox.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "combobox" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["TComboBox"],
|
||||
"Description" : "Demonstrates TComboBox, allows user to select an entry from a pull down list."}
|
||||
}
|
5
examples/Beginner/comdialogs/comdialogs.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "comdialogs" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["Common Dialogs","TOpenDialog","TSaveDialog","TFontDialog","TColorDialog","TSelectDirectoryDialog"],
|
||||
"Description" : "Shows a number of the commong dialog boxes. "}
|
||||
}
|
5
examples/Beginner/controlhint/controlhint.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "ControlHint" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["Hint","Controls","Needs Work"],
|
||||
"Description" : "Demonstrates a range of techniques relating to control hints.\n\nNot clear to me what this is showing, maybe someone else can clarify ?"}
|
||||
}
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
5
examples/Beginner/customhint/customhint.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "CustomHint" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["Hint","Timeout","Format","TTrackBar"],
|
||||
"Description" : "Shows how to control the shown Hint, Timeout etc. Demonstrates performing a function in the Hint (showing updated time of day). Also incidently demonstrates TTrackBar."}
|
||||
}
|
5
examples/Beginner/icons/icons.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "Icons" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["Icon","ico","icns","Application Icon"],
|
||||
"Description" : "Demonstrates loading icon files (ico and icns), scalling and setting as application icon."}
|
||||
}
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
BIN
examples/Beginner/laz_hello/Laz_Hello.ico
Normal file
After Width: | Height: | Size: 64 KiB |
@ -1,56 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<Version Value="12"/>
|
||||
<General>
|
||||
<SessionStorage Value="InIDEConfig"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="test1"/>
|
||||
<Flags>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<Title Value="Laz_Hello"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<DestinationDirectory Value="D:/SourceForge/lazarus/examples/dockmanager/toolbar"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
<DestinationDirectory Value="$(ProjPath)/published/"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
<FormatVersion Value="2"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="3">
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="test1.lpr"/>
|
||||
<Filename Value="Laz_Hello.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="README.txt"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit2>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="Laz_Hello"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Options>
|
25
examples/Beginner/laz_hello/Laz_Hello.lpr
Normal file
@ -0,0 +1,25 @@
|
||||
program Laz_Hello;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}
|
||||
cthreads,
|
||||
{$ENDIF}
|
||||
{$IFDEF HASAMIGA}
|
||||
athreads,
|
||||
{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Scaled := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
BIN
examples/Beginner/laz_hello/Laz_Hello.res
Normal file
5
examples/Beginner/laz_hello/laz_hello.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "Laz_Hello" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["Lazarus","Hello World","TButton","TMemo"],
|
||||
"Description" : "This might be your first Lazarus project, its the traditional Hello World. Two buttons have been dropped on the form, renamed and their captions set. A memo was then added and each button was double clicked and what they are expected to do was set."}
|
||||
}
|
39
examples/Beginner/laz_hello/unit1.lfm
Normal file
@ -0,0 +1,39 @@
|
||||
object Form1: TForm1
|
||||
Left = 515
|
||||
Height = 226
|
||||
Top = 174
|
||||
Width = 467
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 226
|
||||
ClientWidth = 467
|
||||
LCLVersion = '2.3.0.0'
|
||||
object ButtonHello: TButton
|
||||
Left = 40
|
||||
Height = 41
|
||||
Top = 160
|
||||
Width = 103
|
||||
Caption = 'Say Hello'
|
||||
OnClick = ButtonHelloClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object ButtonClose: TButton
|
||||
Left = 272
|
||||
Height = 41
|
||||
Top = 160
|
||||
Width = 91
|
||||
Caption = 'Close'
|
||||
OnClick = ButtonCloseClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object Memo1: TMemo
|
||||
Left = 24
|
||||
Height = 136
|
||||
Top = 16
|
||||
Width = 416
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
ScrollBars = ssAutoVertical
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
46
examples/Beginner/laz_hello/unit1.pas
Normal file
@ -0,0 +1,46 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
ButtonHello: TButton;
|
||||
ButtonClose: TButton;
|
||||
Memo1: TMemo;
|
||||
procedure ButtonCloseClick(Sender: TObject);
|
||||
procedure ButtonHelloClick(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.ButtonHelloClick(Sender: TObject);
|
||||
begin
|
||||
Memo1.Append('Hello World');
|
||||
end;
|
||||
|
||||
procedure TForm1.ButtonCloseClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
examples/Beginner/laz_scalable/Laz_Scalable.ico
Normal file
After Width: | Height: | Size: 64 KiB |
@ -4,60 +4,64 @@
|
||||
<Version Value="12"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InIDEConfig"/>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<Title Value="Laz_Scalable"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<DestinationDirectory Value="$(ProjPath)/published/"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default"/>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="EasyDockMgr"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="MakeSite.lpr"/>
|
||||
<Filename Value="Laz_Scalable.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="fmastersite.pas"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="MasterSite"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="fMasterSite"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="MakeSite"/>
|
||||
<Filename Value="Laz_Scalable"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
25
examples/Beginner/laz_scalable/Laz_Scalable.lpr
Normal file
@ -0,0 +1,25 @@
|
||||
program Laz_Scalable;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}
|
||||
cthreads,
|
||||
{$ENDIF}
|
||||
{$IFDEF HASAMIGA}
|
||||
athreads,
|
||||
{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Scaled := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
BIN
examples/Beginner/laz_scalable/Laz_Scalable.res
Normal file
5
examples/Beginner/laz_scalable/laz_scalable.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "Laz_Scalable" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["Anchors","scaleable"],
|
||||
"Description" : "This project has the anchors set of all its components in the Object Inspector. Now, as you resize the window, the components auto adjust their position."}
|
||||
}
|
60
examples/Beginner/laz_scalable/unit1.lfm
Normal file
@ -0,0 +1,60 @@
|
||||
object Form1: TForm1
|
||||
Left = 515
|
||||
Height = 226
|
||||
Top = 174
|
||||
Width = 467
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 226
|
||||
ClientWidth = 467
|
||||
LCLVersion = '2.3.0.0'
|
||||
object ButtonHello: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 10
|
||||
Height = 41
|
||||
Top = 175
|
||||
Width = 103
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Left = 10
|
||||
BorderSpacing.Bottom = 10
|
||||
Caption = 'Say Hello'
|
||||
OnClick = ButtonHelloClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object ButtonClose: TButton
|
||||
AnchorSideRight.Control = Memo1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonHello
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 320
|
||||
Height = 41
|
||||
Top = 175
|
||||
Width = 137
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Close'
|
||||
OnClick = ButtonCloseClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object Memo1: TMemo
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonHello
|
||||
Left = 10
|
||||
Height = 155
|
||||
Top = 10
|
||||
Width = 447
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 10
|
||||
BorderSpacing.Top = 10
|
||||
BorderSpacing.Right = 10
|
||||
BorderSpacing.Bottom = 10
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
ScrollBars = ssAutoVertical
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
46
examples/Beginner/laz_scalable/unit1.pas
Normal file
@ -0,0 +1,46 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
ButtonHello: TButton;
|
||||
ButtonClose: TButton;
|
||||
Memo1: TMemo;
|
||||
procedure ButtonCloseClick(Sender: TObject);
|
||||
procedure ButtonHelloClick(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.ButtonHelloClick(Sender: TObject);
|
||||
begin
|
||||
Memo1.Append('Hello World');
|
||||
end;
|
||||
|
||||
procedure TForm1.ButtonCloseClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
5
examples/Beginner/lclversion/lclversion.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "lclversion" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["LCL Version","Version String"],
|
||||
"Description" : "Small app that demonstrates how to read the LCL version defined in every Lazarus app.\n"}
|
||||
}
|
5
examples/Beginner/listbox/listbox.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "listbox" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["TListBox"],
|
||||
"Description" : "Demonstrate TListBox, adding and removing entries."}
|
||||
}
|
5
examples/Beginner/listview/listview.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "listview" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["TListView"],
|
||||
"Description" : "Demonstrates TListView, how to add and remove items and sub items."}
|
||||
}
|
5
examples/Beginner/loadpicture/loadpicture.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "loadpicture" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["TImage","LoadFromFile"],
|
||||
"Description" : "Shows how to load an image file and display it. In this case a png file but many other formats also supported."}
|
||||
}
|
@ -15,7 +15,6 @@
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
@ -34,13 +33,14 @@
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="LoadPicture.lpr"/>
|
||||
<Filename Value="loadpicture.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="loadpicturefrm.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="LoadBitmapForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="LoadPictureFrm"/>
|
||||
</Unit1>
|
||||
@ -50,7 +50,7 @@
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="LoadPicture"/>
|
||||
<Filename Value="loadpicture"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
@ -30,11 +30,8 @@ implementation
|
||||
{ TLoadBitmapForm }
|
||||
|
||||
procedure TLoadBitmapForm.FormCreate(Sender: TObject);
|
||||
var
|
||||
FileName: String;
|
||||
begin
|
||||
Filename := SetDirSeparators('../images/splash_logo.xpm');
|
||||
Image1.Picture.LoadFromFile(Filename);
|
||||
Image1.Picture.LoadFromFile('powered_by.png');
|
||||
end;
|
||||
|
||||
end.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
5
examples/Beginner/memo/memo.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "memo" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["TMemo"],
|
||||
"Description" : "Shows how to add and copy text to and from TMemos."}
|
||||
}
|
5
examples/Beginner/messagedialogs/messagedialogs.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "messagedialogs" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["MessageDlg","ShowMessage"],
|
||||
"Description" : "Shows how to display both ShowMessage and MessageDlg in a couple of formats."}
|
||||
}
|
5
examples/Beginner/notebook/notebook.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "notebook" : {
|
||||
"Category" : "Beginner",
|
||||
"Keywords" : ["TNoteBook"],
|
||||
"Description" : "Demonstrates TNoteBook"}
|
||||
}
|
129
examples/Components/BitButton/bitbtnform.lfm
Normal file
@ -0,0 +1,129 @@
|
||||
object Form1: TForm1
|
||||
Left = 270
|
||||
Height = 170
|
||||
Top = 131
|
||||
Width = 335
|
||||
Caption = 'TBitBtn Verify'
|
||||
ClientHeight = 170
|
||||
ClientWidth = 335
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '2.3.0.0'
|
||||
object Button1: TBitBtn
|
||||
Left = 12
|
||||
Height = 120
|
||||
Top = 12
|
||||
Width = 120
|
||||
Caption = 'Button1'
|
||||
TabOrder = 0
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 144
|
||||
Height = 120
|
||||
Top = 12
|
||||
Width = 80
|
||||
Caption = 'Kind'
|
||||
ClientHeight = 100
|
||||
ClientWidth = 76
|
||||
TabOrder = 1
|
||||
object RadioButton1: TRadioButton
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 6
|
||||
Width = 47
|
||||
Caption = 'Close'
|
||||
Checked = True
|
||||
OnChange = RadioButton1Change
|
||||
TabOrder = 3
|
||||
TabStop = True
|
||||
end
|
||||
object RadioButton2: TRadioButton
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 28
|
||||
Width = 34
|
||||
Caption = 'OK'
|
||||
OnChange = RadioButton2Change
|
||||
TabOrder = 0
|
||||
end
|
||||
object RadioButton3: TRadioButton
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 50
|
||||
Width = 54
|
||||
Caption = 'Cancel'
|
||||
OnChange = RadioButton3Change
|
||||
TabOrder = 1
|
||||
end
|
||||
object RadioButton4: TRadioButton
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 72
|
||||
Width = 43
|
||||
Caption = 'Help'
|
||||
OnChange = RadioButton4Change
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object GroupBox2: TGroupBox
|
||||
Left = 240
|
||||
Height = 120
|
||||
Top = 12
|
||||
Width = 80
|
||||
Caption = 'Type'
|
||||
ClientHeight = 100
|
||||
ClientWidth = 76
|
||||
TabOrder = 2
|
||||
object RadioButton5: TRadioButton
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 6
|
||||
Width = 38
|
||||
Caption = 'Left'
|
||||
Checked = True
|
||||
OnChange = RadioButton5Change
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
end
|
||||
object RadioButton6: TRadioButton
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 28
|
||||
Width = 38
|
||||
Caption = 'Top'
|
||||
OnChange = RadioButton6Change
|
||||
TabOrder = 1
|
||||
end
|
||||
object RadioButton7: TRadioButton
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 50
|
||||
Width = 46
|
||||
Caption = 'Right'
|
||||
OnChange = RadioButton7Change
|
||||
TabOrder = 2
|
||||
end
|
||||
object RadioButton8: TRadioButton
|
||||
Left = 8
|
||||
Height = 19
|
||||
Top = 72
|
||||
Width = 58
|
||||
Caption = 'Bottom'
|
||||
OnChange = RadioButton8Change
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 144
|
||||
Height = 15
|
||||
Top = 144
|
||||
Width = 34
|
||||
Caption = 'Label1'
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 240
|
||||
Height = 15
|
||||
Top = 144
|
||||
Width = 34
|
||||
Caption = 'Label2'
|
||||
end
|
||||
end
|
108
examples/Components/BitButton/bitbtnform.pas
Normal file
@ -0,0 +1,108 @@
|
||||
unit BitBtnForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Buttons, ExtCtrls,
|
||||
StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TBitBtn;
|
||||
GroupBox1: TGroupBox;
|
||||
GroupBox2: TGroupBox;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
RadioButton1: TRadioButton;
|
||||
RadioButton2: TRadioButton;
|
||||
RadioButton3: TRadioButton;
|
||||
RadioButton4: TRadioButton;
|
||||
RadioButton5: TRadioButton;
|
||||
RadioButton6: TRadioButton;
|
||||
RadioButton7: TRadioButton;
|
||||
RadioButton8: TRadioButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure RadioButton1Change(Sender: TObject);
|
||||
procedure RadioButton2Change(Sender: TObject);
|
||||
procedure RadioButton3Change(Sender: TObject);
|
||||
procedure RadioButton4Change(Sender: TObject);
|
||||
procedure RadioButton5Change(Sender: TObject);
|
||||
procedure RadioButton6Change(Sender: TObject);
|
||||
procedure RadioButton7Change(Sender: TObject);
|
||||
procedure RadioButton8Change(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
RadioButton1Change(nil);
|
||||
RadioButton5Change(nil);
|
||||
end;
|
||||
|
||||
procedure TForm1.RadioButton1Change(Sender: TObject);
|
||||
begin
|
||||
Button1.Kind := bkClose;
|
||||
Label1.Caption := 'bkClose';
|
||||
end;
|
||||
|
||||
procedure TForm1.RadioButton2Change(Sender: TObject);
|
||||
begin
|
||||
Button1.Kind := bkOK;
|
||||
Label1.Caption := 'bkOK';
|
||||
end;
|
||||
|
||||
procedure TForm1.RadioButton3Change(Sender: TObject);
|
||||
begin
|
||||
Button1.Kind := bkCancel;
|
||||
Label1.Caption := 'bkCancel';
|
||||
end;
|
||||
|
||||
procedure TForm1.RadioButton4Change(Sender: TObject);
|
||||
begin
|
||||
Button1.Kind := bkHelp;
|
||||
Label1.Caption := 'bkHelp';
|
||||
end;
|
||||
|
||||
procedure TForm1.RadioButton5Change(Sender: TObject);
|
||||
begin
|
||||
Button1.Layout := blGlyphLeft;
|
||||
Label2.Caption := 'blGlyphLeft';
|
||||
end;
|
||||
|
||||
procedure TForm1.RadioButton6Change(Sender: TObject);
|
||||
begin
|
||||
Button1.Layout := blGlyphTop;
|
||||
Label2.Caption := 'blGlyphTop';
|
||||
end;
|
||||
|
||||
procedure TForm1.RadioButton7Change(Sender: TObject);
|
||||
begin
|
||||
Button1.Layout := blGlyphRight;
|
||||
Label2.Caption := 'blGlyphRight';
|
||||
end;
|
||||
|
||||
procedure TForm1.RadioButton8Change(Sender: TObject);
|
||||
begin
|
||||
Button1.Layout := blGlyphBottom;
|
||||
Label2.Caption := 'blGlyphBottom';
|
||||
end;
|
||||
|
||||
end.
|
||||
|
7
examples/Components/BitButton/bitbutton.ex-meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"BitButton" : {
|
||||
"Category" : "Components",
|
||||
"Keywords" : ["TBitButton"],
|
||||
"Description" : "This example shows how a BitButton, that is a button with a small bitmap, can be used."}
|
||||
}
|
||||
|
81
examples/Components/BitButton/bitbutton.lpi
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<Title Value="BitButton"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="bitbutton.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="BitButton_Demo"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="bitbtnform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="BitBtnForm"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="BitButton"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
@ -18,18 +18,29 @@
|
||||
* *
|
||||
***************************************************************************
|
||||
}
|
||||
program Selection;
|
||||
program BitButton_Demo;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
Interfaces,
|
||||
Forms,
|
||||
Selectionform,
|
||||
ControlSelection;
|
||||
{$IFDEF UNIX}
|
||||
cthreads,
|
||||
{$ENDIF}
|
||||
{$IFDEF HASAMIGA}
|
||||
athreads,
|
||||
{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, BitBtnForm
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Title:='BitButton';
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
5
examples/Components/Completion/Completion.ex-meta
Normal file
@ -0,0 +1,5 @@
|
||||
{ "Completion" : {
|
||||
"Category" : "Components",
|
||||
"Keywords" : ["SynEdit", "Auto Completion", "TSynAutoComplete"],
|
||||
"Description" : "Example for SynEdit's auto-completion features. As used in the Lazarus IDE, provides 2 different auto-completion features."}
|
||||
}
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 66 KiB |