mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 05:39:14 +02:00
LCL: Take the width of TPageControl's TTabSheets into account in an autosized form. Issue #36493, patch by Joeny Ang.
git-svn-id: trunk@65218 -
This commit is contained in:
parent
1159b4327b
commit
a04f03d6df
@ -527,6 +527,7 @@ type
|
|||||||
property PageControl: TPageControl read GetPageControl write SetPageControl;
|
property PageControl: TPageControl read GetPageControl write SetPageControl;
|
||||||
property TabIndex: Integer read GetTabIndex;
|
property TabIndex: Integer read GetTabIndex;
|
||||||
published
|
published
|
||||||
|
property AutoSize;
|
||||||
property BorderWidth;
|
property BorderWidth;
|
||||||
property BiDiMode;
|
property BiDiMode;
|
||||||
property Caption;
|
property Caption;
|
||||||
@ -606,6 +607,7 @@ type
|
|||||||
|
|
||||||
property Align;
|
property Align;
|
||||||
property Anchors;
|
property Anchors;
|
||||||
|
property AutoSize;
|
||||||
property BorderSpacing;
|
property BorderSpacing;
|
||||||
property BiDiMode;
|
property BiDiMode;
|
||||||
property Constraints;
|
property Constraints;
|
||||||
|
@ -221,6 +221,10 @@ end;
|
|||||||
|
|
||||||
function TCustomPage.IsControlVisible: Boolean;
|
function TCustomPage.IsControlVisible: Boolean;
|
||||||
begin
|
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;
|
Result := inherited IsControlVisible;
|
||||||
if Result and (Parent is TCustomTabControl) then
|
if Result and (Parent is TCustomTabControl) then
|
||||||
Result := PageIndex = TCustomTabControl(Parent).PageIndex;
|
Result := PageIndex = TCustomTabControl(Parent).PageIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user