diff options
author | Graeme Geldenhuys <graemeg@users.sourceforge.net> | 2007-05-01 18:20:12 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@users.sourceforge.net> | 2007-05-01 18:20:12 +0000 |
commit | ca38402b7cecfb29523181c100d429772bb25e00 (patch) | |
tree | ddc4ea959f60b3c59232e17ba9a7285afc8dc719 /examples/gui/widgettest | |
parent | 55825e0ebbe83c960478600f37858fdb8df2cf82 (diff) | |
download | fpGUI-ca38402b7cecfb29523181c100d429772bb25e00.tar.xz |
* GUI: Implemented a very basic ShowMessag() function.
This is still work in progress!
* GUI: Implemented TFBoxLayout.RemoveChild
* GFX/X11: Fixed a issue with the TextExtent where the
lower curl of the character g will get clipped
* GUI: Implemented a basic TDBLabel component
* GUI Demos: Implemented a basic DB Test example. This is
still work in progress and only tested under Linux.
* GFX: Minor AMD64 fix for the unitxft.pas unit
Diffstat (limited to 'examples/gui/widgettest')
-rw-r--r-- | examples/gui/widgettest/mainform.frm | 5 | ||||
-rw-r--r-- | examples/gui/widgettest/widgettest.lpi | 7 | ||||
-rw-r--r-- | examples/gui/widgettest/widgettest.pas | 13 |
3 files changed, 19 insertions, 6 deletions
diff --git a/examples/gui/widgettest/mainform.frm b/examples/gui/widgettest/mainform.frm index 165907a1..ce0f8ae6 100644 --- a/examples/gui/widgettest/mainform.frm +++ b/examples/gui/widgettest/mainform.frm @@ -70,6 +70,11 @@ object MainForm: TMainForm Text = 'Progress Bar'
OnClick = ProgressBarBtnClick
end
+ object ShowMessageBtn: TFButton
+ CanExpandWidth = True
+ Text = 'ShowMessage()'
+ OnClick = ShowMessageBtnClick
+ end
object Separator: TSeparator
end
object ExitBtn: TFButton
diff --git a/examples/gui/widgettest/widgettest.lpi b/examples/gui/widgettest/widgettest.lpi index 711d2936..be425d5c 100644 --- a/examples/gui/widgettest/widgettest.lpi +++ b/examples/gui/widgettest/widgettest.lpi @@ -1,7 +1,7 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="\"/> + <PathDelim Value="/"/> <Version Value="5"/> <General> <Flags> @@ -9,7 +9,7 @@ </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value=".\"/> + <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <PublishOptions> @@ -20,7 +20,7 @@ <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"> @@ -39,7 +39,6 @@ </ProjectOptions> <CompilerOptions> <Version Value="5"/> - <PathDelim Value="\"/> <Parsing> <SyntaxOptions> <IncludeAssertionCode Value="True"/> diff --git a/examples/gui/widgettest/widgettest.pas b/examples/gui/widgettest/widgettest.pas index 8dea18a2..0705396a 100644 --- a/examples/gui/widgettest/widgettest.pas +++ b/examples/gui/widgettest/widgettest.pas @@ -57,6 +57,7 @@ type MenuBtn: TFButton; PanelBtn: TFButton; ProgressBarBtn: TFButton; + ShowMessageBtn: TFButton; Separator: TSeparator; ExitBtn: TFButton; procedure CheckBoxBtnClick(Sender: TObject); @@ -72,6 +73,7 @@ type procedure MenuBtnClick(Sender: TObject); procedure PanelBtnClick(Sender: TObject); procedure ProgressBarBtnClick(Sender: TObject); + procedure ShowMessageBtnClick(Sender: TObject); end; @@ -567,8 +569,8 @@ procedure TMainForm.PanelBtnClick(Sender: TObject); begin if not Assigned(_frmPanel) then _frmPanel := TPanelForm.Create(self); - _frmPanel.Show; - _frmPanel.SetPosition(Point(Left + Width + 5, FindForm.Top)); + _frmPanel.ShowModal; +// _frmPanel.SetPosition(Point(Left + Width + 5, FindForm.Top)); end; procedure TMainForm.ProgressBarBtnClick(Sender: TObject); @@ -579,6 +581,11 @@ begin _frmProgressBar.SetPosition(Point(Left + Width + 5, FindForm.Top)); end; +procedure TMainForm.ShowMessageBtnClick(Sender: TObject); +begin + ShowMessage('Hello World!'); +end; + // ------------------------------------------------------------------- // TCheckboxForm @@ -772,6 +779,8 @@ begin for y := 0 to StringGrid.RowCount - 1 do for x := 0 to StringGrid.ColCount - 1 do StringGrid.Cells[x, y] := Format('%d, %d', [x, y]); + + StringGrid.Cells[3, 3] := 'This is one long piece of text'; end; constructor TGridForm.Create(AOwner: TComponent); |