summaryrefslogtreecommitdiff
path: root/src/gui/gui_edit.pas
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-30 14:18:03 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-30 14:18:03 +0000
commit5e28b873d852f64020ac991d64f8c1dd0e21b0f6 (patch)
tree9fd3b98302838af1d8bb538af6533d03e5950785 /src/gui/gui_edit.pas
parent37a180859483a5a6bdd49c55c4a2eeaaa2c36e3c (diff)
downloadfpGUI-5e28b873d852f64020ac991d64f8c1dd0e21b0f6.tar.xz
* Memo: OnUpdate now fires at correct times.
* Memo: Scrollbars now stay in sync with mouse wheel scroll.
Diffstat (limited to 'src/gui/gui_edit.pas')
-rw-r--r--src/gui/gui_edit.pas13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/gui_edit.pas b/src/gui/gui_edit.pas
index c67edaca..484da030 100644
--- a/src/gui/gui_edit.pas
+++ b/src/gui/gui_edit.pas
@@ -17,6 +17,7 @@ type
TfpgEdit = class(TfpgCustomEdit)
private
+ FOnChange: TNotifyEvent;
FText: string;
FMaxLength: integer;
FCursorPos: integer;
@@ -49,7 +50,7 @@ type
destructor Destroy; override;
function SelectionText: string;
property Font: TfpgFont read FFont;
- OnChange: TNotifyEvent;
+ property OnChange: TNotifyEvent read FOnChange write FOnChange;
published
property Text: string read FText write SetText;
property FontDesc: string read GetFontDesc write SetFontDesc;
@@ -97,7 +98,7 @@ begin
FDrawOffset := 0;
PasswordMode := False;
- OnChange := nil;
+ FOnChange := nil;
end;
destructor TfpgEdit.Destroy;
@@ -306,8 +307,8 @@ begin
end;
if prevval <> Text then
- if Assigned(OnChange) then
- OnChange(self);
+ if Assigned(FOnChange) then
+ FOnChange(self);
if consumed then
RePaint
@@ -459,8 +460,8 @@ begin
inherited;
if hasChanged then
- if Assigned(OnChange) then
- OnChange(self);
+ if Assigned(FOnChange) then
+ FOnChange(self);
end;
procedure TfpgEdit.HandleLMouseDown(x, y: integer; shiftstate: TShiftState);