mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 04:19:47 +02:00
EditButton: fix responding to Shift-Tab (Issue #0028161).
git-svn-id: trunk@49165 -
This commit is contained in:
parent
172dbb56d6
commit
81be2b6595
@ -47,6 +47,7 @@ type
|
||||
protected
|
||||
procedure DoEnter; override;
|
||||
procedure DoExit; override;
|
||||
function PerformTab(ForwardTab: boolean): boolean; override;
|
||||
end;
|
||||
|
||||
{ TCustomEditButton }
|
||||
@ -989,6 +990,22 @@ begin
|
||||
inherited DoExit;
|
||||
end;
|
||||
|
||||
function TEbEdit.PerformTab(ForwardTab: boolean): boolean;
|
||||
begin
|
||||
//if not Forward then inherited PerFormTab will set focus to the owning
|
||||
//TCustomEditButton, which immediately transfers the focus back to the TEbEdit
|
||||
//so let TCustomEditButton do the Performtab in this case
|
||||
if ForwardTab then
|
||||
Result := inherited PerformTab(ForwardTab)
|
||||
else
|
||||
begin
|
||||
if Assigned(Owner) and (Owner is TCustomEditButton) then
|
||||
Result := TCustomEditButton(Owner).PerformTab(ForwardTab)
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TCustomEditButton }
|
||||
|
||||
procedure TCustomEditButton.InternalOnButtonClick(Sender: TObject);
|
||||
|
Loading…
Reference in New Issue
Block a user