diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-05-17 09:41:15 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-05-17 09:41:15 +0200 |
commit | be73fa35d8985e154b7e107679dffb70a7af61d2 (patch) | |
tree | 9cb4e43578a1d1cab713d46fe4c5ded1f3ca8dc4 /examples | |
parent | 8572cf76297b7085f002c3fcb776b003eb4a233e (diff) | |
download | fpGUI-be73fa35d8985e154b7e107679dffb70a7af61d2.tar.xz |
Splashscreen demo: mention difference between waBorderless and wtPopup.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gui/splashscreen/frm_main.pas | 24 | ||||
-rw-r--r-- | examples/gui/splashscreen/frm_splashscreen.pas | 2 | ||||
-rw-r--r-- | examples/gui/splashscreen/test.lpi | 2 |
3 files changed, 19 insertions, 9 deletions
diff --git a/examples/gui/splashscreen/frm_main.pas b/examples/gui/splashscreen/frm_main.pas index bc367e8e..7ecf663c 100644 --- a/examples/gui/splashscreen/frm_main.pas +++ b/examples/gui/splashscreen/frm_main.pas @@ -24,6 +24,7 @@ type mnuFile: TfpgPopupMenu; btnShowBorderless: TfpgButton; btnShowSplash: TfpgButton; + Label1: TfpgLabel; {@VFD_HEAD_END: MainForm} public procedure AfterCreate; override; @@ -58,9 +59,7 @@ uses constructor TBorderLessForm.Create(AOwner: TComponent); begin inherited Create(AOwner); -// WindowType := wtPopup; // removes borders and title bar - Include(FWindowAttributes, waBorderLess) -// WindowAttributes := WindowAttributes + [waStayOnTop]; // well, it lets the window stay on top. :) + Include(FWindowAttributes, waBorderLess); // borderless and steals focus like a normal form end; procedure TBorderLessForm.AfterCreate; @@ -139,7 +138,7 @@ begin with btnAdd do begin Name := 'btnAdd'; - SetPosition(260, 36, 148, 24); + SetPosition(260, 28, 148, 24); Text := 'Add Text to Memo'; FontDesc := '#Label1'; Hint := ''; @@ -151,7 +150,7 @@ begin with memName1 do begin Name := 'memName1'; - SetPosition(8, 36, 236, 228); + SetPosition(8, 28, 236, 236); Hint := ''; Lines.Add(''); FontDesc := '#Edit1'; @@ -190,7 +189,7 @@ begin with btnShowBorderless do begin Name := 'btnShowBorderless'; - SetPosition(260, 68, 148, 24); + SetPosition(260, 56, 148, 24); Text := 'Show Borderless Form'; FontDesc := '#Label1'; Hint := ''; @@ -202,7 +201,7 @@ begin with btnShowSplash do begin Name := 'btnShowSplash'; - SetPosition(260, 100, 148, 24); + SetPosition(260, 84, 148, 24); Text := 'Show Splash Screen'; FontDesc := '#Label1'; Hint := ''; @@ -210,6 +209,17 @@ begin TabOrder := 7; end; + Label1 := TfpgLabel.Create(self); + with Label1 do + begin + Name := 'Label1'; + SetPosition(252, 120, 156, 116); + FontDesc := '#Label1'; + Hint := ''; + Text := 'Note the difference between a borderless form and a splash screen (wtPopup) form. wtPopup doesn''t steal focus (eg: hint window)'; + WrapText := True; + end; + {@VFD_BODY_END: MainForm} {%endregion} diff --git a/examples/gui/splashscreen/frm_splashscreen.pas b/examples/gui/splashscreen/frm_splashscreen.pas index ccb432cc..30dff1c9 100644 --- a/examples/gui/splashscreen/frm_splashscreen.pas +++ b/examples/gui/splashscreen/frm_splashscreen.pas @@ -55,7 +55,7 @@ end; constructor TSplashForm.Create(AOwner: TComponent); begin inherited Create(AOwner); - WindowType := wtPopup; // removes borders and title bar + WindowType := wtPopup; // borderless but doesn't steal focus WindowAttributes := WindowAttributes + [waStayOnTop]; // well, it lets the window stay on top. :) tmr := TfpgTimer.Create(3000); diff --git a/examples/gui/splashscreen/test.lpi b/examples/gui/splashscreen/test.lpi index 9ff31725..fa0ecd6b 100644 --- a/examples/gui/splashscreen/test.lpi +++ b/examples/gui/splashscreen/test.lpi @@ -12,7 +12,7 @@ <TargetFileExt Value=""/> </General> <VersionInfo> - <ProjectVersion Value=""/> + <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/> </VersionInfo> <PublishOptions> <Version Value="2"/> |