mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 03:16:12 +02:00
win32: adjust notebook pages size after page add/remove/options change by cobines (issue #0018317)
git-svn-id: trunk@28861 -
This commit is contained in:
parent
ea3028e5b6
commit
acf7b58d7b
@ -449,9 +449,9 @@ procedure TCustomNotebook.SetOptions(const AValue: TNoteBookOptions);
|
||||
var
|
||||
ChangedOptions: TNoteBookOptions;
|
||||
begin
|
||||
if FOptions=AValue then exit;
|
||||
ChangedOptions:=(FOptions-AValue)+(AValue-FOptions);
|
||||
FOptions:=AValue;
|
||||
if FOptions = AValue then Exit;
|
||||
ChangedOptions := (FOptions - AValue) + (AValue - FOptions);
|
||||
FOptions := AValue;
|
||||
if nboShowCloseButtons in ChangedOptions then
|
||||
UpdateTabProperties;
|
||||
if HandleAllocated then
|
||||
|
@ -474,7 +474,8 @@ begin
|
||||
// clientrect possible changed, adding first tab, or deleting last
|
||||
// windows should send a WM_SIZE message because of this, but it doesn't
|
||||
// send it ourselves
|
||||
LCLControlSizeNeedsUpdate(ANotebook, True);
|
||||
if LCLControlSizeNeedsUpdate(ANotebook, True) then
|
||||
AdjustSizeNotebookPages(ANotebook);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -489,6 +490,8 @@ class procedure TWin32WSCustomNotebook.RemovePage(const ANotebook: TCustomNotebo
|
||||
const AIndex: integer);
|
||||
begin
|
||||
Windows.SendMessage(ANotebook.Handle, TCM_DELETEITEM, Windows.WPARAM(AIndex), 0);
|
||||
if LCLControlSizeNeedsUpdate(ANotebook, True) then
|
||||
AdjustSizeNotebookPages(ANotebook);
|
||||
end;
|
||||
|
||||
{ -----------------------------------------------------------------------------
|
||||
@ -726,7 +729,8 @@ begin
|
||||
begin
|
||||
SetWindowLong(ANotebook.Handle, GWL_STYLE, NewStyle);
|
||||
SetWindowPos(ANoteBook.Handle, 0, 0, 0, 0, 0, SWP_NOSIZE or SWP_NOMOVE or SWP_NOZORDER or SWP_DRAWFRAME);
|
||||
LCLControlSizeNeedsUpdate(ANotebook, True);
|
||||
if LCLControlSizeNeedsUpdate(ANotebook, True) then
|
||||
AdjustSizeNotebookPages(ANotebook);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user