diff options
Diffstat (limited to 'examples/gui/helloworld/helloworld.pas')
-rw-r--r-- | examples/gui/helloworld/helloworld.pas | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/examples/gui/helloworld/helloworld.pas b/examples/gui/helloworld/helloworld.pas deleted file mode 100644 index 5e139fff..00000000 --- a/examples/gui/helloworld/helloworld.pas +++ /dev/null @@ -1,63 +0,0 @@ -program HelloWorld; - -{$mode objfpc}{$h+} - -uses - fpGUI - ,fpGFX { GFApplication } - ,gfxBase - ; - -type - TMainForm = class(TFForm) - private - BoxLayout: TFBoxLayout; - btnHello: TFButton; - public - procedure AfterConstruction; override; - end; - - -{ TMainForm } - -procedure TMainForm.AfterConstruction; -var - lSize: TSize; -begin - inherited AfterConstruction; - Name := 'MainForm'; - BorderWidth := 8; - Text := 'fpGUI Application'; - - { every fpGUI app needs a layout manager } - BoxLayout := TFBoxLayout.Create(self); - BoxLayout.Spacing := 8; - BoxLayout.VertAlign := vertFill; - InsertChild(BoxLayout); - - { create our button } - btnHello := TFButton.Create('Hello World!', self); - btnHello.CanExpandWidth := True; - btnHello.CanExpandHeight := True; - BoxLayout.InsertChild(btnHello); - - { set a min and max size } - lSize.cx := 150; - lSize.cy := 100; - Wnd.SetMinMaxClientSize(lSize, lSize); -end; - - -var - MainForm: TMainForm; -begin - GFApplication.Initialize; - MainForm := TMainForm.Create(GFApplication); - try - MainForm.Show; - GFApplication.Run; - finally - MainForm.Free; - end; -end. - |