diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-03 19:23:40 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-03 19:23:40 +0000 |
commit | cfbb1096706f6234cf8ac8fb0feefaae8b881ba9 (patch) | |
tree | f86d7fb67c7568cdd8284743f07a47cf457851ca /prototypes/miglayout/test.lpr | |
parent | cec78aca668fb7b5eba7f60852854697619573ca (diff) | |
download | fpGUI-cfbb1096706f6234cf8ac8fb0feefaae8b881ba9.tar.xz |
* Added my MiG Layout Manager code to the prototypes diretory while I continue working on the port from Java.
Diffstat (limited to 'prototypes/miglayout/test.lpr')
-rw-r--r-- | prototypes/miglayout/test.lpr | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/prototypes/miglayout/test.lpr b/prototypes/miglayout/test.lpr new file mode 100644 index 00000000..cd01e75c --- /dev/null +++ b/prototypes/miglayout/test.lpr @@ -0,0 +1,62 @@ +program test; + +{$mode objfpc}{$H+} + +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Classes, fpgfx, gui_form, gui_label, + gui_miglayout, gui_mig_lc, gui_mig_constraintparser, gui_mig_boundsize, +gui_mig_unitvalue, gui_mig_exceptions; + +type + TMainForm = class(TfpgForm) + private + FPanel: TfpgLayoutPanel; + FLabel1: TfpgLabel; + public + constructor Create(AOwner: TComponent); override; + procedure AfterCreate; override; + end; + +{ TMainForm } + +constructor TMainForm.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + WindowTitle := 'MiG Layout Test'; + WindowPosition := wpUser; + + FPanel := TfpgLayoutPanel.Create(self); + + SetPosition(100, 100, 300, 200); +end; + +procedure TMainForm.AfterCreate; +begin +// FLabel1 := TfpgLabel.Create(FPanel); +// FPanel.Add(FLabel1, ''); +end; + + +procedure MainProc; +var + frm: TMainForm; +begin + fpgApplication.Initialize; + frm := TMainForm.Create(nil); + try + frm.Show; + fpgApplication.Run; + finally + frm.Free; + end; +end; + +begin + MainProc; +end. + + + |