LCL: implemented TNotebook.ShowControl

git-svn-id: trunk@46550 -
This commit is contained in:
mattias 2014-10-14 07:32:45 +00:00
parent 8653b579e2
commit ee30d04a07
2 changed files with 13 additions and 0 deletions

View File

@ -122,6 +122,7 @@ type
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
procedure ShowControl(AControl: TControl); override;
{ function TabIndexAtClientPos(ClientPos: TPoint): integer;
function TabRect(AIndex: Integer): TRect;
function GetImageIndex(ThePageIndex: Integer): Integer; virtual;

View File

@ -226,3 +226,15 @@ begin
inherited Destroy;
end;
procedure TNotebook.ShowControl(AControl: TControl);
var
i: Integer;
begin
if AControl = ActivePageComponent then exit;
i := FPageList.IndexOf(Pointer(aControl));
if i >= 0 then
PageIndex := i
else
inherited ShowControl(AControl);
end;