From 316a16c5f3337ad23ecdfdd6444c0b72af3f2406 Mon Sep 17 00:00:00 2001 From: graemeg Date: Mon, 27 Aug 2007 12:57:16 +0000 Subject: * 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. --- extras/code_templates/lazarus.dci | 55 ++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 33 deletions(-) (limited to 'extras/code_templates') 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. + -- cgit v1.2.3-70-g09d2