From 2967687379e1a18d398de10d249b4e646bab0bd6 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 7 Jan 2009 10:55:49 +0000 Subject: [PATCH] lcl: fix visibility of pagecontrol pages after window recreation (bug #0011334) git-svn-id: trunk@18185 - --- lcl/extctrls.pp | 1 + lcl/include/custompage.inc | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lcl/extctrls.pp b/lcl/extctrls.pp index 04e4563673..63ecd34470 100644 --- a/lcl/extctrls.pp +++ b/lcl/extctrls.pp @@ -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; diff --git a/lcl/include/custompage.inc b/lcl/include/custompage.inc index 43797b1f45..1e29477171 100644 --- a/lcl/include/custompage.inc +++ b/lcl/include/custompage.inc @@ -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;