mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-26 09:47:16 +01: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
|
var
|
||||||
ChangedOptions: TNoteBookOptions;
|
ChangedOptions: TNoteBookOptions;
|
||||||
begin
|
begin
|
||||||
if FOptions=AValue then exit;
|
if FOptions = AValue then Exit;
|
||||||
ChangedOptions:=(FOptions-AValue)+(AValue-FOptions);
|
ChangedOptions := (FOptions - AValue) + (AValue - FOptions);
|
||||||
FOptions:=AValue;
|
FOptions := AValue;
|
||||||
if nboShowCloseButtons in ChangedOptions then
|
if nboShowCloseButtons in ChangedOptions then
|
||||||
UpdateTabProperties;
|
UpdateTabProperties;
|
||||||
if HandleAllocated then
|
if HandleAllocated then
|
||||||
|
|||||||
@ -474,7 +474,8 @@ begin
|
|||||||
// clientrect possible changed, adding first tab, or deleting last
|
// clientrect possible changed, adding first tab, or deleting last
|
||||||
// windows should send a WM_SIZE message because of this, but it doesn't
|
// windows should send a WM_SIZE message because of this, but it doesn't
|
||||||
// send it ourselves
|
// send it ourselves
|
||||||
LCLControlSizeNeedsUpdate(ANotebook, True);
|
if LCLControlSizeNeedsUpdate(ANotebook, True) then
|
||||||
|
AdjustSizeNotebookPages(ANotebook);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -489,6 +490,8 @@ class procedure TWin32WSCustomNotebook.RemovePage(const ANotebook: TCustomNotebo
|
|||||||
const AIndex: integer);
|
const AIndex: integer);
|
||||||
begin
|
begin
|
||||||
Windows.SendMessage(ANotebook.Handle, TCM_DELETEITEM, Windows.WPARAM(AIndex), 0);
|
Windows.SendMessage(ANotebook.Handle, TCM_DELETEITEM, Windows.WPARAM(AIndex), 0);
|
||||||
|
if LCLControlSizeNeedsUpdate(ANotebook, True) then
|
||||||
|
AdjustSizeNotebookPages(ANotebook);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ -----------------------------------------------------------------------------
|
{ -----------------------------------------------------------------------------
|
||||||
@ -726,7 +729,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
SetWindowLong(ANotebook.Handle, GWL_STYLE, NewStyle);
|
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);
|
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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user