LCL, grids, fix cbsEllipsis editor not allowing focus change, issue #25824

git-svn-id: trunk@44415 -
This commit is contained in:
jesus 2014-03-13 00:48:43 +00:00
parent 156692fdcd
commit 564b4228a3

View File

@ -297,6 +297,7 @@ type
destructor Destroy; override;
procedure AddEditor(aEditor: TWinControl; aAlign: TAlign; ActiveCtrl:boolean);
procedure SetFocus; override;
function Focused: Boolean; override;
property MaxLength: Integer read GetMaxLength write SetMaxLength;
property ActiveControl: TWinControl read GetActiveControl;
end;
@ -12088,6 +12089,19 @@ begin
inherited SetFocus;
end;
function TCompositeCellEditor.Focused: Boolean;
var
i: Integer;
begin
Result:=inherited Focused;
if not result then
for i:=0 to Length(Feditors)-1 do
if (FEditors[i].Editor<>nil) and (FEditors[i].Editor.Focused) then begin
result := true;
break;
end;
end;
procedure TCompositeCellEditor.WndProc(var TheMessage: TLMessage);
begin
with TheMessage do