added TWinControl.SelectFirst

git-svn-id: trunk@9046 -
This commit is contained in:
mattias 2006-03-30 09:27:44 +00:00
parent 034bc02c11
commit 13302aeb6c
2 changed files with 16 additions and 0 deletions

View File

@ -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;

View File

@ -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;