lcl: fix visibility of pagecontrol pages after window recreation (bug #0011334)

git-svn-id: trunk@18185 -
This commit is contained in:
paul 2009-01-07 10:55:49 +00:00
parent 37e866d1ea
commit 2967687379
2 changed files with 11 additions and 4 deletions

View File

@ -77,6 +77,7 @@ type
function CanTab: boolean; override;
function AutoSizeDelayed: boolean; override;
function IsControlVisible: Boolean; override;
function HandleObjectShouldBeVisible: boolean; override;
function VisibleIndex: integer;
property PageIndex: Integer read GetPageIndex write SetPageIndex;
property TabVisible: Boolean read GetTabVisible write SetTabVisible default True;

View File

@ -218,11 +218,17 @@ end;
function TCustomPage.IsControlVisible: Boolean;
begin
if Parent is TCustomNotebook then
begin
Result := (PageIndex = TCustomNotebook(Parent).PageIndex);
end else begin
Result := (PageIndex = TCustomNotebook(Parent).PageIndex)
else
Result := inherited IsControlVisible;
end;
end;
function TCustomPage.HandleObjectShouldBeVisible: boolean;
begin
if Parent is TCustomNotebook then
Result := (PageIndex = TCustomNotebook(Parent).PageIndex)
else
Result := inherited HandleObjectShouldBeVisible;
end;
function TCustomPage.VisibleIndex: integer;