diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-09-21 11:33:11 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-09-21 11:33:11 +0200 |
commit | f91ce56a1e21a20be8fb00b797ccaebfe3755dc9 (patch) | |
tree | 1ea8f81d3d56b8eb1f868c39118fb3fd8883de09 /src/gui | |
parent | 62d90a25765775cebc1ad613deb580da27848aec (diff) | |
download | fpGUI-f91ce56a1e21a20be8fb00b797ccaebfe3755dc9.tar.xz |
PromputUserDialog: changes so descendants have better access to certain data.
- We can new set an initial UserID too.
- Moved two TfpgEdit components to protected section.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/promptuserdialog.inc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/promptuserdialog.inc b/src/gui/promptuserdialog.inc index e2013ef7..68b27f05 100644 --- a/src/gui/promptuserdialog.inc +++ b/src/gui/promptuserdialog.inc @@ -7,11 +7,12 @@ private lblTitle: TfpgLabel; lblTitlePw: TfpgLabel; - edUserID: TfpgEdit; - edPassword: TfpgEdit; function GetUserID: TfpgString; function GetUserPassword: TfpgString; + procedure SetUserID(const AValue: TfpgString); protected + edUserID: TfpgEdit; + edPassword: TfpgEdit; procedure btnOKClick(Sender: TObject); override; public constructor Create(AOwner: TComponent); override; @@ -19,7 +20,7 @@ // Subclass will have to override and implement it. By default it returns True. function Authenticate: boolean; virtual; procedure Wiggle(const Seconds: integer = 1; const MovingPixels: integer = 5; const aSleep: integer = 75); - property UserID: TfpgString read GetUserID; + property UserID: TfpgString read GetUserID write SetUserID; property Password: TfpgString read GetUserPassword; end; @@ -58,6 +59,11 @@ begin Result := edPassword.Text; end; +procedure TfpgPromptUserDialog.SetUserID(const AValue: TfpgString); +begin + edUserID.Text := AValue; +end; + procedure TfpgPromptUserDialog.btnOKClick(Sender: TObject); begin if Authenticate then |