mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:19:18 +02:00
LCL: TCustomNotebook added workaround for win32/64 intf that does not send WMSize messages for hidden pages
git-svn-id: trunk@12494 -
This commit is contained in:
parent
8d2a89ca23
commit
3cf6a7f99d
@ -824,15 +824,18 @@ begin
|
|||||||
// first make the new page visible
|
// first make the new page visible
|
||||||
//DebugLn(['TCustomNotebook.ShowCurrentPage ',DbgSName(CurPage),' CurPage.Visible=',CurPage.Visible]);
|
//DebugLn(['TCustomNotebook.ShowCurrentPage ',DbgSName(CurPage),' CurPage.Visible=',CurPage.Visible]);
|
||||||
if CurPage.Visible then begin
|
if CurPage.Visible then begin
|
||||||
// TCustomPage.IsControlVisible is overriden
|
|
||||||
// therefore AutoSizing of childs was skipped => do it now
|
|
||||||
if FPageIndexOnLastShow<>fPageIndex then begin
|
if FPageIndexOnLastShow<>fPageIndex then begin
|
||||||
FPageIndexOnLastShow:=fPageIndex;
|
// some widgetsets like win32/64 do not send WM_SIZE messages for
|
||||||
|
// hidden pages. Force resizing page (it is alClient).
|
||||||
|
ReAlign;
|
||||||
|
// TCustomPage.IsControlVisible is overriden
|
||||||
|
// therefore AutoSizing of childs was skipped => do it now
|
||||||
CurPage.ReAlign;
|
CurPage.ReAlign;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
CurPage.Visible := true;
|
CurPage.Visible := true;
|
||||||
end;
|
end;
|
||||||
|
FPageIndexOnLastShow:=fPageIndex;
|
||||||
CurPage.DoShow;
|
CurPage.DoShow;
|
||||||
if (FPageIndexOnLastChange >= 0) and (FPageIndexOnLastChange < PageCount) and
|
if (FPageIndexOnLastChange >= 0) and (FPageIndexOnLastChange < PageCount) and
|
||||||
(FPageIndexOnLastChange <> FPageIndex) then
|
(FPageIndexOnLastChange <> FPageIndex) then
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
// {$DEFINE ASSERT_IS_ON}
|
// {$DEFINE ASSERT_IS_ON}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{off $DEFINE CHECK_POSITION}
|
{ $DEFINE CHECK_POSITION}
|
||||||
{$IFDEF CHECK_POSITION}
|
{$IFDEF CHECK_POSITION}
|
||||||
const CheckPostionClassName = 'xxTHintWindow';
|
const CheckPostionClassName = 'xxxTPage';
|
||||||
const CheckPostionName = 'xxxPathsPage';
|
const CheckPostionName = 'xxxPathsPage';
|
||||||
|
|
||||||
function CheckPosition(AControl: TControl): boolean;
|
function CheckPosition(AControl: TControl): boolean;
|
||||||
@ -5839,7 +5839,7 @@ var
|
|||||||
NewBoundsRealized: TRect;
|
NewBoundsRealized: TRect;
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseSizeMsg}
|
{$IFDEF VerboseSizeMsg}
|
||||||
//if CheckPosition(Self) then
|
if CheckPosition(Self) then
|
||||||
DebugLn(['TWinControl.WMSize A ',Name,':',ClassName,' Message=',Message.Width,',',Message.Height,
|
DebugLn(['TWinControl.WMSize A ',Name,':',ClassName,' Message=',Message.Width,',',Message.Height,
|
||||||
' BoundsRealized=',dbgs(FBoundsRealized),' FromIntf=',(Message.SizeType and Size_SourceIsInterface)>0]);
|
' BoundsRealized=',dbgs(FBoundsRealized),' FromIntf=',(Message.SizeType and Size_SourceIsInterface)>0]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
Loading…
Reference in New Issue
Block a user