blob: a21c6190dc906168f1d1a07763a404b38ba234ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
[fpguiapp | fpGUI template application]
uses
fpGFX, fpGUI;
type
TMainForm = class(TForm)
private
FMainLayout: TBoxLayout;
lblTemplate: TLabel;
public
procedure AfterConstruction; override;
end;
{ TMainForm }
procedure TMainForm.AfterConstruction;
begin
inherited AfterConstruction;
Name := 'MainForm';
BorderWidth := 8;
Text := 'fpGUI Template Application';
FMainLayout := TBoxLayout.Create(self);
FMainLayout.Spacing := 8;
FMainLayout.Orientation := Vertical;
FMainLayout.VertAlign := vertFill;
InsertChild(FMainLayout);
lblTemplate := TLabel.Create('MainForm', self);
FMainLayout.InsertChild(lblTemplate);
// Create other components here
end;
var
MainForm: TMainForm;
begin
GFApplication.Initialize;
MainForm := TMainForm.Create(GFApplication);
try
MainForm.Show;
GFApplication.Run;
finally
MainForm.Free;
end;
end.
|