diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-11-18 10:16:13 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-11-18 10:16:13 +0200 |
commit | 1e916603e6b783c25c58b08c2165497b103ccf80 (patch) | |
tree | 63aee7b6cc2a4f0e3ae2a0fabb04d2de7a80d39c | |
parent | 698b3b878fa2b67bb99be46dc0eef71ea170129f (diff) | |
download | fpGUI-1e916603e6b783c25c58b08c2165497b103ccf80.tar.xz |
UI Designer: minor code cleanup.
-rw-r--r-- | uidesigner/vfddesigner.pas | 2 | ||||
-rw-r--r-- | uidesigner/vfdforms.pas | 24 |
2 files changed, 17 insertions, 9 deletions
diff --git a/uidesigner/vfddesigner.pas b/uidesigner/vfddesigner.pas index 5966865b..b8fd6b82 100644 --- a/uidesigner/vfddesigner.pas +++ b/uidesigner/vfddesigner.pas @@ -678,7 +678,7 @@ var begin frm := TWidgetOrderForm.Create(nil); frm.WindowTitle := cEditOrder[AMode]; - frm.lblTitle.Text := Format(frm.lblTitle.Text, [cEditOrder[AMode]]); + frm.Title := cEditOrder[AMode]; fi := 0; identlevel := 0; diff --git a/uidesigner/vfdforms.pas b/uidesigner/vfdforms.pas index 9f25be01..1cb0017b 100644 --- a/uidesigner/vfdforms.pas +++ b/uidesigner/vfdforms.pas @@ -84,21 +84,24 @@ type TWidgetOrderForm = class(TVFDDialog) + private + function GetTitle: string; + procedure SetTitle(const AValue: string); public {@VFD_HEAD_BEGIN: WidgetOrderForm} - - lblTitle: TfpgLabel; btnOK: TfpgButton; btnCancel: TfpgButton; btnUp: TfpgButton; btnDown: TfpgButton; TreeView1: TfpgTreeView; - {@VFD_HEAD_END: WidgetOrderForm} + {@VFD_HEAD_END: WidgetOrderForm} + public constructor Create(AOwner: TComponent); override; destructor Destroy; override; procedure AfterCreate; override; procedure OnButtonClick(Sender: TObject); + property Title: string read GetTitle write SetTitle; end; @@ -244,6 +247,16 @@ end; { TWidgetOrderForm } +function TWidgetOrderForm.GetTitle: string; +begin + Result := lblTitle.Text; +end; + +procedure TWidgetOrderForm.SetTitle(const AValue: string); +begin + lblTitle.Text := Format(lblTitle.Text, [AValue]); +end; + constructor TWidgetOrderForm.Create(AOwner: TComponent); begin inherited Create(AOwner); @@ -261,11 +274,6 @@ procedure TWidgetOrderForm.AfterCreate; begin inherited AfterCreate; {@VFD_BODY_BEGIN: WidgetOrderForm} - - - - - Name := 'WidgetOrderForm'; SetPosition(534, 173, 426, 398); WindowTitle := 'Widget order'; |