diff --git a/lcl/comctrls.pp b/lcl/comctrls.pp index 7955f08702..4e7a4f24a3 100644 --- a/lcl/comctrls.pp +++ b/lcl/comctrls.pp @@ -527,6 +527,7 @@ type property PageControl: TPageControl read GetPageControl write SetPageControl; property TabIndex: Integer read GetTabIndex; published + property AutoSize; property BorderWidth; property BiDiMode; property Caption; @@ -606,6 +607,7 @@ type property Align; property Anchors; + property AutoSize; property BorderSpacing; property BiDiMode; property Constraints; diff --git a/lcl/include/custompage.inc b/lcl/include/custompage.inc index 1c2b5fec3c..000b40be77 100644 --- a/lcl/include/custompage.inc +++ b/lcl/include/custompage.inc @@ -221,6 +221,10 @@ end; function TCustomPage.IsControlVisible: Boolean; begin + // when autosizing, need this to return True so that the sizes of non-active + // pages will be considered in parent's GetPreferredSize() + if AutoSizingAll then + Exit(True); Result := inherited IsControlVisible; if Result and (Parent is TCustomTabControl) then Result := PageIndex = TCustomTabControl(Parent).PageIndex;