diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-09-17 15:11:39 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-09-17 15:11:39 +0000 |
commit | 62315fc3d566047896a37eb6c6e721c6c8072f46 (patch) | |
tree | 2056a7a3970beea62c25d75f4aa1649e19d2f148 /src/gui/gui_edit.pas | |
parent | 64721019859c52c10e0d2d5ad8e4ce56985088cd (diff) | |
download | fpGUI-62315fc3d566047896a37eb6c6e721c6c8072f46.tar.xz |
Designer: minor fix with the Grid Resolution.
* GUI: Made the PasswordMode a property of TfpgEdit.
Diffstat (limited to 'src/gui/gui_edit.pas')
-rw-r--r-- | src/gui/gui_edit.pas | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/gui_edit.pas b/src/gui/gui_edit.pas index ad04f01d..41b9cddc 100644 --- a/src/gui/gui_edit.pas +++ b/src/gui/gui_edit.pas @@ -18,6 +18,7 @@ type TfpgEdit = class(TfpgCustomEdit) private FOnChange: TNotifyEvent; + FPasswordMode: boolean; FText: string; FMaxLength: integer; FCursorPos: integer; @@ -31,6 +32,7 @@ type function GetFontDesc: string; procedure SetBackgroundColor(const AValue: TfpgColor); procedure SetFontDesc(const AValue: string); + procedure SetPasswordMode(const AValue: boolean); procedure SetText(const AValue: string); procedure DeleteSelection; procedure DoCopy; @@ -45,11 +47,11 @@ type procedure HandleMouseEnter; override; procedure HandleMouseExit; override; public - PasswordMode: boolean; constructor Create(AOwner: TComponent); override; destructor Destroy; override; function SelectionText: string; property Font: TfpgFont read FFont; + property PasswordMode: boolean read FPasswordMode write SetPasswordMode; property OnChange: TNotifyEvent read FOnChange write FOnChange; published property Text: string read FText write SetText; @@ -96,7 +98,7 @@ begin FSelStart := FCursorPos; FSelOffset := 0; FDrawOffset := 0; - PasswordMode := False; + FPasswordMode := False; FOnChange := nil; end; @@ -155,6 +157,12 @@ begin RePaint; end; +procedure TfpgEdit.SetPasswordMode(const AValue: boolean); +begin + if FPasswordMode=AValue then exit; + FPasswordMode:=AValue; +end; + procedure TfpgEdit.DeleteSelection; begin if FSelOffset <> 0 then |