mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 19:59:17 +02:00
LCL-CustomDrawn: Now writing db data via a TDBEdit also works, as I fixed the CM_TEXTCHANGED signal sending
git-svn-id: trunk@39474 -
This commit is contained in:
parent
ceaecc704b
commit
9b8ffbeb1f
@ -1406,6 +1406,7 @@ procedure TCDEdit.SetLines(AValue: TStrings);
|
|||||||
begin
|
begin
|
||||||
if FLines=AValue then Exit;
|
if FLines=AValue then Exit;
|
||||||
FLines.Assign(AValue);
|
FLines.Assign(AValue);
|
||||||
|
DoChange();
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2001,6 +2002,7 @@ begin
|
|||||||
FEditState.CaretPos.Y := 0;
|
FEditState.CaretPos.Y := 0;
|
||||||
end
|
end
|
||||||
else FLines.Strings[FEditState.CaretPos.Y] := AStr;
|
else FLines.Strings[FEditState.CaretPos.Y] := AStr;
|
||||||
|
DoChange();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCDEdit.GetSelStartX: Integer;
|
function TCDEdit.GetSelStartX: Integer;
|
||||||
|
@ -10,7 +10,7 @@ uses
|
|||||||
// LCL
|
// LCL
|
||||||
Controls, Graphics, stdctrls, extctrls, comctrls,
|
Controls, Graphics, stdctrls, extctrls, comctrls,
|
||||||
customdrawnproc, customdrawncontrols, lcltype, lclproc, lclintf,
|
customdrawnproc, customdrawncontrols, lcltype, lclproc, lclintf,
|
||||||
spin;
|
lmessages, spin;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -23,7 +23,12 @@ type
|
|||||||
LCLControl: TCustomButton;
|
LCLControl: TCustomButton;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TCDIntfEdit }
|
||||||
|
|
||||||
TCDIntfEdit = class(TCDEdit)
|
TCDIntfEdit = class(TCDEdit)
|
||||||
|
protected
|
||||||
|
// for descendents to override
|
||||||
|
procedure DoChange; override;
|
||||||
public
|
public
|
||||||
LCLControl: TCustomEdit;
|
LCLControl: TCustomEdit;
|
||||||
end;
|
end;
|
||||||
@ -318,5 +323,19 @@ begin
|
|||||||
(AControl is TCDIntfPageControl);}
|
(AControl is TCDIntfPageControl);}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TCDIntfEdit }
|
||||||
|
|
||||||
|
procedure TCDIntfEdit.DoChange;
|
||||||
|
var
|
||||||
|
Msg: TLMessage;
|
||||||
|
begin
|
||||||
|
inherited DoChange;
|
||||||
|
|
||||||
|
// TCustomEdit responds only to CM_TEXTCHANGED, it doesn't respond to LM_CHANGED. TComboBox responds to LM_CHANGED
|
||||||
|
FillChar(Msg{%H-}, SizeOf(Msg), 0);
|
||||||
|
Msg.Msg := CM_TEXTCHANGED;
|
||||||
|
DeliverMessage(LCLControl, Msg);
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user