summaryrefslogtreecommitdiff
path: root/examples/gui/utfdemo/utfdemo.lpr
blob: 3d047bec45d9247fe0a24a119217e8410443c350 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
program utfdemo;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes,
  gfxbase,
  fpgui, fpGUI_laz;

type

  { TMainForm }

  TMainForm = class(TForm)
  private
    FLayout: TBoxLayout;
    procedure MainFormActivate(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
  published
    TextLabel: TLabel;
  end;


{ TMainForm }

procedure TMainForm.MainFormActivate(Sender: TObject);
var
  max: TSize;
begin
  max.cx := 320;
  max.cy := 200;
  Wnd.SetMinMaxClientSize(MinSize, max);
end;


constructor TMainForm.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  Name            := 'frmMain';
  BorderWidth     := 8;
//  WindowType      := wtWindow;
  Text            := 'UTF Demo';
  OnActivate      := @MainFormActivate;

  FLayout         := TBoxLayout.Create(self);
  FLayout.Parent  := self;
  InsertChild(FLayout);

  TextLabel       := TLabel.Create(self);
  TextLabel.Text  := '&Gráficas Magnificacion! Teste';
  FLayout.InsertChild(TextLabel);
end;


var
  MainForm: TMainForm;
begin
  MainForm := TMainForm.Create(Application);
  try
    MainForm.Show;
    Application.Run;
  finally
    MainForm.Free;
  end;
end.