mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 07:29:30 +02:00
added TWinControl.SelectFirst
git-svn-id: trunk@9046 -
This commit is contained in:
parent
034bc02c11
commit
13302aeb6c
lcl
@ -1593,6 +1593,7 @@ type
|
||||
protected
|
||||
function FindNextControl(CurrentControl: TWinControl; GoForward,
|
||||
CheckTabStop, CheckParent: Boolean): TWinControl;
|
||||
procedure SelectFirst;
|
||||
function RealGetText: TCaption; override;
|
||||
function GetBorderStyle: TBorderStyle;
|
||||
function GetChildsRect(Scrolled: boolean): TRect; override;
|
||||
|
@ -2730,6 +2730,21 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinControl.SelectFirst;
|
||||
var
|
||||
Form : TCustomForm;
|
||||
Control : TWinControl;
|
||||
begin
|
||||
Form := GetParentForm(Self);
|
||||
if Form <> nil then begin
|
||||
Control := FindNextControl(nil, true, true, false);
|
||||
if Control = nil then
|
||||
Control := FindNextControl(nil, true, false, false);
|
||||
if Control <> nil then
|
||||
Form.ActiveControl := Control;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinControl.FixupTabList;
|
||||
var
|
||||
Count, I, J: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user