diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-27 12:57:16 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-27 12:57:16 +0000 |
commit | 316a16c5f3337ad23ecdfdd6444c0b72af3f2406 (patch) | |
tree | a4209a054dc20164758f01c619533b09ca120acc /extras/code_templates | |
parent | 4fd4e5cc02054005ce8a9aae976350aefc54a94e (diff) | |
download | fpGUI-316a16c5f3337ad23ecdfdd6444c0b72af3f2406.tar.xz |
* Implemented List Mediators with tiOPF support and added a demo.
* Added a quick workaround for the InvertCaret function causing a AV.
* MenuBar now keeps the current menu focused even if you open more than
2 levels deep of Popup Menus.
* Added some TODO entries to Widgets. Also published some missing properties.
* Fixed repainting issue with TfpgComobBox when you set the Width from code
and made the component focusable. Not sure why it wasn't!
* Updated Lazarus IDE code template for new fpGUI applications.
Diffstat (limited to 'extras/code_templates')
-rw-r--r-- | extras/code_templates/lazarus.dci | 55 |
1 files changed, 22 insertions, 33 deletions
diff --git a/extras/code_templates/lazarus.dci b/extras/code_templates/lazarus.dci index a21c6190..888b0b1e 100644 --- a/extras/code_templates/lazarus.dci +++ b/extras/code_templates/lazarus.dci @@ -1,50 +1,39 @@ [fpguiapp | fpGUI template application] uses - fpGFX, fpGUI; + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Classes, fpgfx, gui_form; type - TMainForm = class(TForm) - private - FMainLayout: TBoxLayout; - lblTemplate: TLabel; + TMainForm = class(TfpgForm) public - procedure AfterConstruction; override; + constructor Create(AOwner: TComponent); override; end; - { TMainForm } -procedure TMainForm.AfterConstruction; +constructor TMainForm.Create(AOwner: TComponent); 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 - + inherited Create(AOwner); + WindowTitle := 'My Title'; + WindowPosition := wpUser; + SetPosition(100, 100, 300, 200); end; +procedure MainProc; var - MainForm: TMainForm; + frm: TMainForm; begin - GFApplication.Initialize; - MainForm := TMainForm.Create(GFApplication); - try - MainForm.Show; - GFApplication.Run; - finally - MainForm.Free; - end; + fpgApplication.Initialize; + frm := TMainForm.Create(nil); + frm.Show; + fpgApplication.Run; +end; + +begin + MainProc; end. + |