summaryrefslogtreecommitdiff
path: root/prototypes/multihandle/test.lpr
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@users.sourceforge.net>2006-11-29 21:48:40 +0000
committerGraeme Geldenhuys <graemeg@users.sourceforge.net>2006-11-29 21:48:40 +0000
commit5ac16e54f84f95b0319680e4a5630329391d5ec7 (patch)
tree73d77a49cb630d7079e5c5f9973997b3ff58ee2f /prototypes/multihandle/test.lpr
parent2d2e0db915663e3f06f0661137acf446bfe79231 (diff)
downloadfpGUI-5ac16e54f84f95b0319680e4a5630329391d5ec7.tar.xz
One-Handle-Per-Widget
* TForm now descends from TWidget. This removed a lot of code * TWidget now sets the Title by default to Classname. Under X11 this is handy when runnning xwininfo, which will now show form structure with classnames for each window. * TWidget now has a default WindowOptions type of woChildWindow * TForm has a default WindowOptions type of woWindow
Diffstat (limited to 'prototypes/multihandle/test.lpr')
-rw-r--r--prototypes/multihandle/test.lpr11
1 files changed, 8 insertions, 3 deletions
diff --git a/prototypes/multihandle/test.lpr b/prototypes/multihandle/test.lpr
index 35651a5e..ca717ea1 100644
--- a/prototypes/multihandle/test.lpr
+++ b/prototypes/multihandle/test.lpr
@@ -42,13 +42,18 @@ type
public
constructor Create; override;
end;
+
+const
+ clBlue: TGfxColor = (Red: $0000; Green: $0000; Blue: $FF00; Alpha: 0);
+ clLightSteelBlue: TGfxColor = (Red: $B000; Green: $C400; Blue: $DE00; Alpha: 0);
{ TMyPopup }
constructor TMyPopup.Create;
begin
inherited Create;
- SetClientSize(Size(150, 320));
+ Title := 'My Popup';
+ SetClientSize(Size(180, 320));
end;
{ TMainWindow }
@@ -69,11 +74,10 @@ var
frm: TMyPopup;
begin
frm := TMyPopup.Create;
- frm.FParent := self;
GFApplication.AddWindow(frm);
+// frm.SetPosition(Point(0, btnPopup.Height));
frm.Show;
- frm.SetPosition(Point(0, btnPopup.Height));
end;
constructor TMainWindow.Create;
@@ -81,6 +85,7 @@ begin
inherited Create;
Title := 'fpGUI multi-handle example';
SetClientSize(Size(320, 200));
+ Color := clLightSteelBlue;
btnClose := TButton.Create(self, Point(20, 150));
btnClose.Caption := 'Close';