summaryrefslogtreecommitdiff
path: root/src/gui/fpg_memo.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/fpg_memo.pas')
-rw-r--r--src/gui/fpg_memo.pas24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/gui/fpg_memo.pas b/src/gui/fpg_memo.pas
index df16367b..374c8d47 100644
--- a/src/gui/fpg_memo.pas
+++ b/src/gui/fpg_memo.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2012 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -145,9 +145,17 @@ type
property TabOrder;
property TextColor;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
+ property OnDragEnter;
+ property OnDragLeave;
+ property OnDragDrop;
+ property OnDragStartDetected;
property OnEnter;
property OnExit;
+ property OnKeyChar;
property OnKeyPress;
+ property OnMouseEnter;
+ property OnMouseExit;
+ property OnPaint;
property OnShowHint;
end;
@@ -938,7 +946,7 @@ begin
end;
ebsDefault:
begin
- Canvas.DrawControlFrame(r);
+ fpgStyle.DrawControlFrame(Canvas, r);
InflateRect(r, -2, -2);
end;
ebsSingle:
@@ -1058,11 +1066,14 @@ var
s: string;
ls: string;
begin
- inherited;
+ inherited HandleKeyChar(AText, shiftstate, consumed);
+ if consumed then
+ Exit; //==>
+
prevval := Text;
s := AText;
- if (not consumed) and (not ReadOnly) then
+ if (not ReadOnly) then
begin
// Printable characters only
// Note: This is now UTF-8 compliant!
@@ -1082,15 +1093,13 @@ begin
FSelEndLine := -1;
AdjustCursor;
end;
-
consumed := True;
end;
if prevval <> Text then
if Assigned(FOnChange) then
FOnChange(self);
- end;
-
+ end; { if not ReadOnly }
if consumed then
RePaint;
@@ -1670,6 +1679,7 @@ begin
if FUpdateCount <= 0 then
begin
Invalidate;
+ RecalcLongestLine;
UpdateScrollBars;
end;
end;