diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-07 22:52:27 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-07 22:52:27 +0000 |
commit | 77f68d38a6dc24ec0679f7fd23bf42869e795313 (patch) | |
tree | 875e8d65bddd8470aff8026e634738804d59df84 /examples | |
parent | 0fed18d37c6348ec91790f7e3fab843b2efaceda (diff) | |
download | fpGUI-77f68d38a6dc24ec0679f7fd23bf42869e795313.tar.xz |
* Published more events and properties for EditInteger and EditFload components.
* Now the Min/Max Size is actually applied, the Message Dialogs needed minor attention.
* Updated all the example projects to use the newer all-in-one fpgui_toolkit lazarus package.
* Did some minor bug fixing in some of the examples. 1-based indexing instead of 0-based indexing etc.
Diffstat (limited to 'examples')
59 files changed, 158 insertions, 136 deletions
diff --git a/examples/apps/docedit/docedit.lpi b/examples/apps/docedit/docedit.lpi index 1f29664b..98b5cf0f 100644 --- a/examples/apps/docedit/docedit.lpi +++ b/examples/apps/docedit/docedit.lpi @@ -26,14 +26,10 @@ <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> </local> </RunParams> - <RequiredPackages Count="2"> + <RequiredPackages Count="1"> <Item1> - <PackageName Value="FCL"/> + <PackageName Value="fpgui_toolkit"/> </Item1> - <Item2> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> - </Item2> </RequiredPackages> <Units Count="8"> <Unit0> diff --git a/examples/apps/docedit/docedit.lpr b/examples/apps/docedit/docedit.lpr index 493efcb1..e9a6a915 100644 --- a/examples/apps/docedit/docedit.lpr +++ b/examples/apps/docedit/docedit.lpr @@ -8,7 +8,8 @@ uses {$ENDIF}{$ENDIF} Classes, fpgfx, - frm_main, frm_options, model, FPDEUtil, PkEditor, doceditmsg, doceditopts; + frm_main, frm_options, model, FPDEUtil, PkEditor, doceditmsg, doceditopts, + fpgui_toolkit; procedure MainProc; diff --git a/examples/apps/uidesigner/uidesigner.lpi b/examples/apps/uidesigner/uidesigner.lpi index 0d892a09..5090138f 100644 --- a/examples/apps/uidesigner/uidesigner.lpi +++ b/examples/apps/uidesigner/uidesigner.lpi @@ -29,8 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="16"> diff --git a/examples/apps/uidesigner/uidesigner.lpr b/examples/apps/uidesigner/uidesigner.lpr index 96aef118..9104bed5 100644 --- a/examples/apps/uidesigner/uidesigner.lpr +++ b/examples/apps/uidesigner/uidesigner.lpr @@ -25,7 +25,8 @@ uses {$ENDIF}{$ENDIF} Classes, SysUtils, fpgfx, vfdmain, vfdresizer, vfdforms, vfdfile, newformdesigner, vfdwidgets, vfdformparser, vfdeditors, - vfdwidgetclass, vfdutils, vfdprops, vfddesigner, vfdpropeditgrid; + vfdwidgetclass, vfdutils, vfdprops, vfddesigner, vfdpropeditgrid, + fpgui_toolkit; procedure MainProc; diff --git a/examples/corelib/canvastest/fpgcanvas.lpi b/examples/corelib/canvastest/fpgcanvas.lpi index f81836d4..3bc36356 100644 --- a/examples/corelib/canvastest/fpgcanvas.lpi +++ b/examples/corelib/canvastest/fpgcanvas.lpi @@ -29,8 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> @@ -44,8 +43,12 @@ <CompilerOptions> <Version Value="5"/> <CodeGeneration> + <SmartLinkUnit Value="True"/> <Generate Value="Faster"/> </CodeGeneration> + <Linking> + <LinkSmart Value="True"/> + </Linking> <Other> <CustomOptions Value="-FUunits "/> diff --git a/examples/corelib/canvastest/fpgcanvas.lpr b/examples/corelib/canvastest/fpgcanvas.lpr index 79b8de72..bf721f28 100644 --- a/examples/corelib/canvastest/fpgcanvas.lpr +++ b/examples/corelib/canvastest/fpgcanvas.lpr @@ -7,8 +7,8 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, SysUtils, - fpgfx, gfxbase, + fpgfx, gui_form, gfx_imgfmt_bmp; @@ -113,16 +113,16 @@ begin Canvas.DrawButtonFace(r, []); Canvas.DrawString(385, 20, '= []'); r.Top := 50; - Canvas.DrawButtonFace(r, [btnIsDefault]); + Canvas.DrawButtonFace(r, [btfIsDefault]); Canvas.DrawString(385, 50, '= [btnIsDefault]'); r.Top := 80; - Canvas.DrawButtonFace(r, [btnIsPressed]); + Canvas.DrawButtonFace(r, [btfIsPressed]); Canvas.DrawString(385, 80, '= [btnIsPressed]'); r.Top := 110; - Canvas.DrawButtonFace(r, [btnIsEmbedded, btnIsPressed]); + Canvas.DrawButtonFace(r, [btfIsEmbedded, btfIsPressed]); Canvas.DrawString(385, 110, '= [embed & press]'); r.Top := 140; - Canvas.DrawButtonFace(r, [btnIsEmbedded]); + Canvas.DrawButtonFace(r, [btfIsEmbedded]); Canvas.DrawString(385, 140, '= [btnIsEmbedded]'); Canvas.DrawString(45, y, 'DrawControlFrame():'); diff --git a/examples/corelib/eventtest/eventtest.lpi b/examples/corelib/eventtest/eventtest.lpi index e0cd91bf..b1ac640a 100644 --- a/examples/corelib/eventtest/eventtest.lpi +++ b/examples/corelib/eventtest/eventtest.lpi @@ -1,15 +1,15 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="\"/> - <Version Value="5"/> + <PathDelim Value="/"/> + <Version Value="6"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value=".\"/> + <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -23,13 +23,12 @@ <RunParams> <local> <FormatVersion Value="1"/> - <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> + <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> </local> </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgfx_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> @@ -42,14 +41,18 @@ </ProjectOptions> <CompilerOptions> <Version Value="5"/> - <PathDelim Value="\"/> <CodeGeneration> + <SmartLinkUnit Value="True"/> <Optimizations> <OptimizationLevel Value="0"/> </Optimizations> </CodeGeneration> + <Linking> + <LinkSmart Value="True"/> + </Linking> <Other> - <CustomOptions Value="-FUunits"/> + <CustomOptions Value="-FUunits +"/> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> diff --git a/examples/corelib/helloworld/helloworld.lpi b/examples/corelib/helloworld/helloworld.lpi index b6e75c65..fccf438a 100644 --- a/examples/corelib/helloworld/helloworld.lpi +++ b/examples/corelib/helloworld/helloworld.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgfx_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/corelib/helloworld/helloworld.pas b/examples/corelib/helloworld/helloworld.pas index 43198013..ef8eee98 100644 --- a/examples/corelib/helloworld/helloworld.pas +++ b/examples/corelib/helloworld/helloworld.pas @@ -22,7 +22,7 @@ uses Classes ,fpGFX ,GFXBase - ; + , fpgui_toolkit; const HelloWorldString: String = 'Hello, world!'; diff --git a/examples/gui/alignment/aligntest.lpi b/examples/gui/alignment/aligntest.lpi index d00605ba..65f68a59 100644 --- a/examples/gui/alignment/aligntest.lpi +++ b/examples/gui/alignment/aligntest.lpi @@ -25,8 +25,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/alignment/aligntest.lpr b/examples/gui/alignment/aligntest.lpr index a13b5ffd..8fe9cec9 100644 --- a/examples/gui/alignment/aligntest.lpr +++ b/examples/gui/alignment/aligntest.lpr @@ -4,7 +4,7 @@ program aligntest; uses Classes, SysUtils, - fpgfx, gfxbase, gfx_widget, gui_form, gui_label; + fpgfx, gfxbase, gfx_widget, gui_form, gui_label, fpgui_toolkit; type TMainForm = class(TfpgForm) diff --git a/examples/gui/animation/anim_test.lpi b/examples/gui/animation/anim_test.lpi index a6b8a8f6..0dad2a2c 100644 --- a/examples/gui/animation/anim_test.lpi +++ b/examples/gui/animation/anim_test.lpi @@ -29,7 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/animation/anim_test.lpr b/examples/gui/animation/anim_test.lpr index 10cf9286..c83ce2c2 100644 --- a/examples/gui/animation/anim_test.lpr +++ b/examples/gui/animation/anim_test.lpr @@ -9,7 +9,7 @@ uses Classes, SysUtils, // fpGUI fpgfx, gui_form, gfxbase, gui_button, - gui_label, gui_trackbar, gui_animation; + gui_label, gui_trackbar, gui_animation, fpgui_toolkit; type diff --git a/examples/gui/bevel/beveltest.lpi b/examples/gui/bevel/beveltest.lpi index a0654cb0..c42423c9 100644 --- a/examples/gui/bevel/beveltest.lpi +++ b/examples/gui/bevel/beveltest.lpi @@ -1,15 +1,15 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="\"/> - <Version Value="5"/> + <PathDelim Value="/"/> + <Version Value="6"/> <General> <Flags> <SaveOnlyProjectUnits Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value=".\"/> + <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -23,13 +23,12 @@ <RunParams> <local> <FormatVersion Value="1"/> - <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> + <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> </local> </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> @@ -42,7 +41,6 @@ </ProjectOptions> <CompilerOptions> <Version Value="5"/> - <PathDelim Value="\"/> <CodeGeneration> <Generate Value="Faster"/> </CodeGeneration> diff --git a/examples/gui/bevel/beveltest.lpr b/examples/gui/bevel/beveltest.lpr index 3b7deb9d..f7af7cea 100644 --- a/examples/gui/bevel/beveltest.lpr +++ b/examples/gui/bevel/beveltest.lpr @@ -12,7 +12,7 @@ uses gui_form, gui_button, gui_panel, - gui_label; + gui_label, fpgui_toolkit; type TMainForm = class(TfpgForm) diff --git a/examples/gui/calendar/calendartest.lpi b/examples/gui/calendar/calendartest.lpi index 431c61ee..20248a00 100644 --- a/examples/gui/calendar/calendartest.lpi +++ b/examples/gui/calendar/calendartest.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Release="1" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/calendar/calendartest.lpr b/examples/gui/calendar/calendartest.lpr index a38e3727..0ae6e1ba 100644 --- a/examples/gui/calendar/calendartest.lpr +++ b/examples/gui/calendar/calendartest.lpr @@ -11,7 +11,8 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, SysUtils, gfxbase, fpgfx, gui_form, gui_popupcalendar, gui_edit, - gui_button, gui_label, gfx_popupwindow, gui_combobox, gui_checkbox, dateutils; + gui_button, gui_label, gfx_popupwindow, gui_combobox, gui_checkbox, dateutils, + fpgui_toolkit; type TMainForm = class(TfpgForm) diff --git a/examples/gui/colorlistbox/colorlistboxtest.lpi b/examples/gui/colorlistbox/colorlistboxtest.lpi index 2e83aa6d..74da94d9 100644 --- a/examples/gui/colorlistbox/colorlistboxtest.lpi +++ b/examples/gui/colorlistbox/colorlistboxtest.lpi @@ -30,7 +30,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="2"> diff --git a/examples/gui/colorlistbox/colorlistboxtest.lpr b/examples/gui/colorlistbox/colorlistboxtest.lpr index 6bea991c..7407f49a 100644 --- a/examples/gui/colorlistbox/colorlistboxtest.lpr +++ b/examples/gui/colorlistbox/colorlistboxtest.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, frmMain; + Classes, fpgfx, frmMain, fpgui_toolkit; procedure MainProc; diff --git a/examples/gui/combobox/comboboxtest.lpi b/examples/gui/combobox/comboboxtest.lpi index 4e671911..c45931bd 100644 --- a/examples/gui/combobox/comboboxtest.lpi +++ b/examples/gui/combobox/comboboxtest.lpi @@ -29,7 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="3"> diff --git a/examples/gui/combobox/comboboxtest.lpr b/examples/gui/combobox/comboboxtest.lpr index a3a38da1..eb531b7b 100644 --- a/examples/gui/combobox/comboboxtest.lpr +++ b/examples/gui/combobox/comboboxtest.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, frm_main; + Classes, fpgfx, frm_main, fpgui_toolkit; procedure MainProc; var diff --git a/examples/gui/command_interface/test.lpi b/examples/gui/command_interface/test.lpi index 64acd093..1d0b0ee8 100644 --- a/examples/gui/command_interface/test.lpi +++ b/examples/gui/command_interface/test.lpi @@ -28,7 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="3"> diff --git a/examples/gui/command_interface/test.lpr b/examples/gui/command_interface/test.lpr index 663e2e2f..4cdf2667 100644 --- a/examples/gui/command_interface/test.lpr +++ b/examples/gui/command_interface/test.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, gui_form, frm_main, commands, fpgui_package; + Classes, fpgfx, gui_form, frm_main, commands, fpgui_toolkit; procedure MainProc; diff --git a/examples/gui/dbtest/dbtest.lpi b/examples/gui/dbtest/dbtest.lpi index 9bab5c05..847b0588 100644 --- a/examples/gui/dbtest/dbtest.lpi +++ b/examples/gui/dbtest/dbtest.lpi @@ -30,8 +30,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Release="1" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="2"> @@ -59,7 +58,8 @@ <Generate Value="Faster"/> </CodeGeneration> <Other> - <CustomOptions Value="-FUunits"/> + <CustomOptions Value="-FUunits +"/> <CompilerPath Value="$(CompPath)"/> </Other> </CompilerOptions> diff --git a/examples/gui/dbtest/dbtest.lpr b/examples/gui/dbtest/dbtest.lpr index 28d2bd2b..3a30a10a 100644 --- a/examples/gui/dbtest/dbtest.lpr +++ b/examples/gui/dbtest/dbtest.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, frm_main; + Classes, fpgfx, frm_main, fpgui_toolkit; procedure MainProc; diff --git a/examples/gui/dbtest/frm_main.pas b/examples/gui/dbtest/frm_main.pas index 83b25f7e..b361ff92 100644 --- a/examples/gui/dbtest/frm_main.pas +++ b/examples/gui/dbtest/frm_main.pas @@ -22,6 +22,7 @@ type procedure btnLastClick(Sender: TObject); procedure ButtonEnter(Sender: TObject); procedure ButtonExit(Sender: TObject); + procedure FormShow(Sender: TObject); public {@VFD_HEAD_BEGIN: MainForm} btnQuit: TfpgButton; @@ -85,10 +86,31 @@ begin lblStatusBar.Text := ''; end; -constructor TMainForm.Create(AOwner: TComponent); +procedure TMainForm.FormShow(Sender: TObject); var x: Integer; s: string; +begin + dblblName.DataSource := DataSource; + dblblName.DataField := 'Name'; + dblblEMail.DataSource := DataSource; + dblblEMail.DataField := 'Address'; + + DataSet.Open; + while not DataSet.EOF do + begin + SetLength(s, 0); + for x := 0 to DataSet.FieldCount - 2 do + s := s + DataSet.Fields[x].AsString + ', '; + s := s + DataSet.Fields[DataSet.FieldCount - 1].AsString; + lstName1.Items.Add(s); + DataSet.Next; + end; + DataSet.First; +end; + +constructor TMainForm.Create(AOwner: TComponent); +//var // fields: TDbfFieldDefs; begin inherited Create(AOwner); @@ -113,22 +135,7 @@ begin DataSource := TDataSource.Create(Self); DataSource.DataSet := DataSet; - dblblName.DataSource := DataSource; - dblblName.DataField := 'Name'; - dblblEMail.DataSource := DataSource; - dblblEMail.DataField := 'Address'; - - DataSet.Open; - while not DataSet.EOF do - begin - SetLength(s, 0); - for x := 0 to DataSet.FieldCount - 2 do - s := s + DataSet.Fields[x].AsString + ', '; - s := s + DataSet.Fields[DataSet.FieldCount - 1].AsString; - lstName1.Items.Add(s); - DataSet.Next; - end; - DataSet.First; + OnShow :=@FormShow; end; destructor TMainForm.Destroy; diff --git a/examples/gui/edits/edittest.lpi b/examples/gui/edits/edittest.lpi index e9661391..ee87a9f5 100644 --- a/examples/gui/edits/edittest.lpi +++ b/examples/gui/edits/edittest.lpi @@ -29,7 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/edits/edittest.lpr b/examples/gui/edits/edittest.lpr index 6dfe0b63..c7c133f2 100644 --- a/examples/gui/edits/edittest.lpr +++ b/examples/gui/edits/edittest.lpr @@ -7,7 +7,7 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, fpgfx, gui_form, gui_label, gui_edit, gui_button, gui_radiobutton, - gui_listbox, gfxbase; + gui_listbox, gfxbase, gui_checkbox; type @@ -18,10 +18,12 @@ type procedure btnQuitClicked(Sender: TObject); procedure rbClicked(Sender: TObject); procedure lbChange(Sender: TObject); + procedure chbPasswdChanged(Sender: TObject); public {@VFD_HEAD_BEGIN: MainForm} lblName1: TfpgLabel; edtText: TfpgEdit; + chbPasswd: TfpgCheckBox; lblName2: TfpgLabel; lblName3: TfpgLabel; edtInteger: TfpgEditInteger; @@ -60,6 +62,11 @@ begin edtInteger.NegativeColor := lbNegativeColor.Color; end; +procedure TMainForm.chbPasswdChanged(Sender: TObject); +begin + edtText.PasswordMode := chbPasswd.Checked; +end; + procedure TMainForm.AfterCreate; begin {@VFD_BODY_BEGIN: MainForm} @@ -83,15 +90,26 @@ begin Name := 'edtText'; SetPosition(24, 28, 120, 22); TabOrder := 1; - Text := ''; + Text := 'Hello World!'; FontDesc := '#Edit1'; end; + chbPasswd := TfpgCheckBox.Create(self); + with chbPasswd do + begin + Name := 'chbPasswd'; + SetPosition(24, 55, 152, 20); + FontDesc := '#Label1'; + TabOrder := 2; + Text := 'Password Mode'; + OnChange :=@chbPasswdChanged; + end; + lblName2 := TfpgLabel.Create(self); with lblName2 do begin Name := 'lblName2'; - SetPosition(8, 68, 80, 16); + SetPosition(8, 88, 80, 16); FontDesc := '#Label1'; Text := 'Integer Edit'; end; @@ -100,7 +118,7 @@ begin with lblName3 do begin Name := 'lblName3'; - SetPosition(8, 124, 80, 16); + SetPosition(8, 144, 80, 16); FontDesc := '#Label1'; Text := 'Float Edit'; end; @@ -109,14 +127,14 @@ begin with edtInteger do begin Name := 'edtInteger'; - SetPosition(24, 88, 120, 22); + SetPosition(24, 108, 120, 22); end; edtFloat := TfpgEditFloat.Create(self); with edtFloat do begin Name := 'edtFloat'; - SetPosition(24, 144, 120, 22); + SetPosition(24, 164, 120, 22); end; btnQuit := TfpgButton.Create(self); diff --git a/examples/gui/filedialog/filedialog.lpi b/examples/gui/filedialog/filedialog.lpi index 9908bf52..d0831d76 100644 --- a/examples/gui/filedialog/filedialog.lpi +++ b/examples/gui/filedialog/filedialog.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/filegrid/filegrid.lpi b/examples/gui/filegrid/filegrid.lpi index 16e88b3c..a7ffda2f 100644 --- a/examples/gui/filegrid/filegrid.lpi +++ b/examples/gui/filegrid/filegrid.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/filegrid/filegrid.lpr b/examples/gui/filegrid/filegrid.lpr index 07af9520..3492d1be 100644 --- a/examples/gui/filegrid/filegrid.lpr +++ b/examples/gui/filegrid/filegrid.lpr @@ -13,7 +13,7 @@ uses gui_form, gui_grid, gui_checkbox, - gui_button; + gui_button, fpgui_toolkit; type diff --git a/examples/gui/fontselect/fontselect.lpi b/examples/gui/fontselect/fontselect.lpi index d97b57fa..52192bab 100644 --- a/examples/gui/fontselect/fontselect.lpi +++ b/examples/gui/fontselect/fontselect.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/fontselect/fontselect.lpr b/examples/gui/fontselect/fontselect.lpr index 640eec05..6fef097f 100644 --- a/examples/gui/fontselect/fontselect.lpr +++ b/examples/gui/fontselect/fontselect.lpr @@ -14,7 +14,7 @@ uses gui_listbox, gui_edit, gui_label, - gfx_constants; + gfx_constants, fpgui_toolkit; resourcestring diff --git a/examples/gui/gauges/gaugetest.lpi b/examples/gui/gauges/gaugetest.lpi index 0baac1c7..9f3bc7fe 100644 --- a/examples/gui/gauges/gaugetest.lpi +++ b/examples/gui/gauges/gaugetest.lpi @@ -28,7 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/gridtest/gridtest.lpi b/examples/gui/gridtest/gridtest.lpi index 0860255a..c048eb69 100644 --- a/examples/gui/gridtest/gridtest.lpi +++ b/examples/gui/gridtest/gridtest.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/imgtest/bitmaptest.lpi b/examples/gui/imgtest/bitmaptest.lpi index 1160adcf..5b355bac 100644 --- a/examples/gui/imgtest/bitmaptest.lpi +++ b/examples/gui/imgtest/bitmaptest.lpi @@ -29,8 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/listbox/listboxtest.lpi b/examples/gui/listbox/listboxtest.lpi index f80a70b0..84d73d9c 100644 --- a/examples/gui/listbox/listboxtest.lpi +++ b/examples/gui/listbox/listboxtest.lpi @@ -29,7 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="2"> diff --git a/examples/gui/listbox/listboxtest.lpr b/examples/gui/listbox/listboxtest.lpr index dd14a408..9a7dd7c8 100644 --- a/examples/gui/listbox/listboxtest.lpr +++ b/examples/gui/listbox/listboxtest.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, frm_main, fpgui_package; + Classes, fpgfx, frm_main, fpgui_toolkit; procedure MainProc; var diff --git a/examples/gui/listviewtest/listviewtest.lpi b/examples/gui/listviewtest/listviewtest.lpi index d1c4454b..c1facb3c 100644 --- a/examples/gui/listviewtest/listviewtest.lpi +++ b/examples/gui/listviewtest/listviewtest.lpi @@ -4,6 +4,9 @@ <PathDelim Value="/"/> <Version Value="6"/> <General> + <Flags> + <SaveOnlyProjectUnits Value="True"/> + </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> <IconPath Value="./"/> @@ -23,13 +26,10 @@ <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> </local> </RunParams> - <RequiredPackages Count="2"> + <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgfx_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> - <Item2> - <PackageName Value="fpgui_package"/> - </Item2> </RequiredPackages> <Units Count="1"> <Unit0> diff --git a/examples/gui/listviewtest/listviewtest.lpr b/examples/gui/listviewtest/listviewtest.lpr index 553e2d53..6151ff8b 100644 --- a/examples/gui/listviewtest/listviewtest.lpr +++ b/examples/gui/listviewtest/listviewtest.lpr @@ -4,7 +4,8 @@ program listviewtest; uses Classes, fpgfx, sysutils , - gui_listview, gui_form, gui_button, gui_edit, gfxbase, gui_checkbox; + gui_listview, gui_form, gui_button, gui_edit, gfxbase, gui_checkbox, + fpgui_toolkit; type diff --git a/examples/gui/memo/memotest.lpi b/examples/gui/memo/memotest.lpi index a6792148..6052a169 100644 --- a/examples/gui/memo/memotest.lpi +++ b/examples/gui/memo/memotest.lpi @@ -4,6 +4,9 @@ <PathDelim Value="/"/> <Version Value="6"/> <General> + <Flags> + <SaveOnlyProjectUnits Value="True"/> + </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> <IconPath Value="./"/> @@ -26,7 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/modalforms/modalforms.lpi b/examples/gui/modalforms/modalforms.lpi index b4b6cf9e..ed6fa3a9 100644 --- a/examples/gui/modalforms/modalforms.lpi +++ b/examples/gui/modalforms/modalforms.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/panel/mainform.pas b/examples/gui/panel/mainform.pas index ba6fca4e..c9be22eb 100644 --- a/examples/gui/panel/mainform.pas +++ b/examples/gui/panel/mainform.pas @@ -239,12 +239,12 @@ end; procedure TfrmMain.cbxShapeChange(Sender: TObject); begin if Sender is TfpgComboBox then - B_Bevel.Shape := TPanelShape((Sender as TfpgComboBox).FocusItem-1); + B_Bevel.Shape := TPanelShape((Sender as TfpgComboBox).FocusItem); end; procedure TfrmMain.cbxBorderChange(Sender: TObject); begin - if cbxBorder.FocusItem = 1 then + if cbxBorder.FocusItem = 0 then begin B_Bevel.BorderStyle := bsSingle; P_Panel.BorderStyle := bsSingle; @@ -362,13 +362,13 @@ begin cbxShape.Items.Add('bsLeftLine'); cbxShape.Items.Add('bsRightLine'); cbxShape.Items.Add('bsSpacer'); - cbxShape.FocusItem := 1; + cbxShape.FocusItem := 0; cbxShape.OnChange := @cbxShapeChange; cbxBorder := CreateComboBox(self, 250, 528, 100, nil); cbxBorder.Items.Add('bsSingle'); cbxBorder.Items.Add('bsDouble'); - cbxBorder.FocusItem := 1; + cbxBorder.FocusItem := 0; cbxBorder.OnChange := @cbxBorderChange; end; diff --git a/examples/gui/panel/panel_test.lpi b/examples/gui/panel/panel_test.lpi index 39eb3543..ee25dc61 100644 --- a/examples/gui/panel/panel_test.lpi +++ b/examples/gui/panel/panel_test.lpi @@ -29,7 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="2"> diff --git a/examples/gui/panel/panel_test.lpr b/examples/gui/panel/panel_test.lpr index f5365dd5..ff0f1fcd 100644 --- a/examples/gui/panel/panel_test.lpr +++ b/examples/gui/panel/panel_test.lpr @@ -7,25 +7,25 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, - { you can add units after this } fpgfx, + fpgfx, MainForm; procedure MainProc; var frmMain: TfrmMain; begin -fpgApplication.Initialize; -frmMain:= TfrmMain.Create(nil); -try - frmMain.Show; - fpgApplication.Run; -finally - frmMain.Free; + fpgApplication.Initialize; + frmMain:= TfrmMain.Create(nil); + try + frmMain.Show; + fpgApplication.Run; + finally + frmMain.Free; end; end; begin -MainProc; + MainProc; end. diff --git a/examples/gui/splashscreen/test.lpi b/examples/gui/splashscreen/test.lpi index 2d4421c0..fdc9656c 100644 --- a/examples/gui/splashscreen/test.lpi +++ b/examples/gui/splashscreen/test.lpi @@ -28,7 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="4"> diff --git a/examples/gui/splashscreen/test.lpr b/examples/gui/splashscreen/test.lpr index 008d602b..51177fc6 100644 --- a/examples/gui/splashscreen/test.lpr +++ b/examples/gui/splashscreen/test.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, fpgfx, gui_form, frm_main, commands, frm_splashscreen; + Classes, fpgfx, gui_form, frm_main, commands, frm_splashscreen, fpgui_toolkit; procedure MainProc; diff --git a/examples/gui/sprites/spritedemo.lpi b/examples/gui/sprites/spritedemo.lpi index 6cd2d611..d1a1eff7 100644 --- a/examples/gui/sprites/spritedemo.lpi +++ b/examples/gui/sprites/spritedemo.lpi @@ -9,6 +9,7 @@ </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> + <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -28,7 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/sprites/spritedemo.lpr b/examples/gui/sprites/spritedemo.lpr index 12adc82c..14cd06e5 100644 --- a/examples/gui/sprites/spritedemo.lpr +++ b/examples/gui/sprites/spritedemo.lpr @@ -7,7 +7,7 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, SysUtils, - gfxbase, fpgfx, gui_form, gfx_imgfmt_bmp; + gfxbase, fpgfx, gui_form, gfx_imgfmt_bmp, fpgui_toolkit; type diff --git a/examples/gui/stdimages/stdimglist.lpi b/examples/gui/stdimages/stdimglist.lpi index 613a4a70..53d35a7e 100644 --- a/examples/gui/stdimages/stdimglist.lpi +++ b/examples/gui/stdimages/stdimglist.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/stdimages/stdimglist.lpr b/examples/gui/stdimages/stdimglist.lpr index 1bcdcb91..d0ffa87d 100644 --- a/examples/gui/stdimages/stdimglist.lpr +++ b/examples/gui/stdimages/stdimglist.lpr @@ -4,7 +4,7 @@ program stdimglist; uses Classes, SysUtils, - fpgfx, gfxbase, gui_form, gfx_imgfmt_bmp, gui_button; + fpgfx, gfxbase, gui_form, gfx_imgfmt_bmp, gui_button, fpgui_toolkit; type diff --git a/examples/gui/tabtest/tabtest.lpi b/examples/gui/tabtest/tabtest.lpi index ffd8d2dc..5695f0ca 100644 --- a/examples/gui/tabtest/tabtest.lpi +++ b/examples/gui/tabtest/tabtest.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/tabtest/tabtest.lpr b/examples/gui/tabtest/tabtest.lpr index 23feb0cc..db1c6388 100644 --- a/examples/gui/tabtest/tabtest.lpr +++ b/examples/gui/tabtest/tabtest.lpr @@ -7,7 +7,7 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, fpgfx, gfx_widget, gfxbase, gui_form, gui_tab, gui_button, - gui_label, gui_edit, gui_checkbox, gui_combobox; + gui_label, gui_edit, gui_checkbox, gui_combobox, fpgui_toolkit; type TMainForm = class(TfpgForm) @@ -61,7 +61,7 @@ end; procedure TMainForm.cbTabPosChanged(Sender: TObject); begin - if cbTabPos.FocusItem = 1 then + if cbTabPos.FocusItem = 0 then pcMain.TabPosition := tpTop else pcMain.TabPosition := tpBottom; @@ -117,12 +117,14 @@ begin btn3.Anchors := [anLeft, anBottom]; chkSort := CreateCheckBox(self, 190, 320, 'Sort Tabs'); + chkSort.Anchors := [anBottom, anLeft]; chkSort.OnChange := @chkSortChange; cbTabPos := CreateComboBox(self, 300, 320, 80, nil); cbTabPos.Items.Add('tpTop'); cbTabPos.Items.Add('tpBottom'); - cbTabPos.FocusItem := 1; + cbTabPos.FocusItem := 0; + cbTabPos.Anchors := [anBottom, anLeft]; cbTabPos.OnChange := @cbTabPosChanged; end; diff --git a/examples/gui/timertest/timertest.lpi b/examples/gui/timertest/timertest.lpi index 003858f4..c6e3b9ea 100644 --- a/examples/gui/timertest/timertest.lpi +++ b/examples/gui/timertest/timertest.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/timertest/timertest.lpr b/examples/gui/timertest/timertest.lpr index e4189a73..bef9d441 100644 --- a/examples/gui/timertest/timertest.lpr +++ b/examples/gui/timertest/timertest.lpr @@ -6,7 +6,8 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, SysUtils, fpgfx, gfxbase, gui_form, gui_button, gui_label; + Classes, SysUtils, fpgfx, gfxbase, gui_form, gui_button, gui_label, + fpgui_toolkit; type TMainForm = class(TfpgForm) diff --git a/examples/gui/treeviewtest/treeviewtest.lpi b/examples/gui/treeviewtest/treeviewtest.lpi index 4e8a85c2..9251c5f5 100644 --- a/examples/gui/treeviewtest/treeviewtest.lpi +++ b/examples/gui/treeviewtest/treeviewtest.lpi @@ -28,8 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> - <MinVersion Minor="5" Valid="True"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/treeviewtest/treeviewtest.lpr b/examples/gui/treeviewtest/treeviewtest.lpr index f45a07c5..19719f21 100644 --- a/examples/gui/treeviewtest/treeviewtest.lpr +++ b/examples/gui/treeviewtest/treeviewtest.lpr @@ -13,7 +13,7 @@ uses gui_tree, gui_checkbox, gfxbase, - gfx_imagelist; + gfx_imagelist, fpgui_toolkit; type diff --git a/examples/gui/wulinetest/wuline_test.lpi b/examples/gui/wulinetest/wuline_test.lpi index e0f7918c..4a0111f6 100644 --- a/examples/gui/wulinetest/wuline_test.lpi +++ b/examples/gui/wulinetest/wuline_test.lpi @@ -28,7 +28,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/wulinetest/wuline_test.lpr b/examples/gui/wulinetest/wuline_test.lpr index 7459b0f2..5febb965 100644 --- a/examples/gui/wulinetest/wuline_test.lpr +++ b/examples/gui/wulinetest/wuline_test.lpr @@ -7,7 +7,7 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, SysUtils, gfxbase, fpgfx, gui_form, gui_button, math, - gfx_imgfmt_bmp, gfx_wuline, gui_bevel, gui_radiobutton; + gfx_imgfmt_bmp, gfx_wuline, gui_bevel, gui_radiobutton, fpgui_toolkit; type |