mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 00:02:50 +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
|
||||
if FLines=AValue then Exit;
|
||||
FLines.Assign(AValue);
|
||||
DoChange();
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
@ -2001,6 +2002,7 @@ begin
|
||||
FEditState.CaretPos.Y := 0;
|
||||
end
|
||||
else FLines.Strings[FEditState.CaretPos.Y] := AStr;
|
||||
DoChange();
|
||||
end;
|
||||
|
||||
function TCDEdit.GetSelStartX: Integer;
|
||||
|
@ -10,7 +10,7 @@ uses
|
||||
// LCL
|
||||
Controls, Graphics, stdctrls, extctrls, comctrls,
|
||||
customdrawnproc, customdrawncontrols, lcltype, lclproc, lclintf,
|
||||
spin;
|
||||
lmessages, spin;
|
||||
|
||||
type
|
||||
|
||||
@ -23,7 +23,12 @@ type
|
||||
LCLControl: TCustomButton;
|
||||
end;
|
||||
|
||||
{ TCDIntfEdit }
|
||||
|
||||
TCDIntfEdit = class(TCDEdit)
|
||||
protected
|
||||
// for descendents to override
|
||||
procedure DoChange; override;
|
||||
public
|
||||
LCLControl: TCustomEdit;
|
||||
end;
|
||||
@ -318,5 +323,19 @@ begin
|
||||
(AControl is TCDIntfPageControl);}
|
||||
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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user