win32: invalidate pagecontrol client rectangle after the page removing (fixes issue #0014625)

git-svn-id: trunk@25122 -
This commit is contained in:
paul 2010-05-02 04:22:33 +00:00
parent 538910a1bd
commit 340c30848d
2 changed files with 6 additions and 4 deletions

View File

@ -111,7 +111,7 @@ var
ParentNotebook: TCustomNotebook;
i: integer;
begin
if (AParent=Parent) or (pfInserting in FFlags) then Exit;
if (AParent = Parent) or (pfInserting in FFlags) then Exit;
CheckNewParent(AParent);
OldParent := Parent;
if (OldParent <> AParent) and (OldParent <> nil) and
@ -129,7 +129,7 @@ begin
if (OldParent <> AParent) and (Parent <> nil) and (Parent is TCustomNotebook) then
begin
// add to new pagelist
ParentNotebook:=TCustomNotebook(Parent);
ParentNotebook := TCustomNotebook(Parent);
i := ParentNotebook.PageList.IndexOf(Self);
if i < 0 then
ParentNotebook.InsertPage(Self, ParentNotebook.PageCount);

View File

@ -314,8 +314,10 @@ begin
PageIndex := TCustomPage(AWinControl).PageIndex;
RealIndex := TWin32WSCustomNotebook.GetPageRealIndex(TCustomNotebook(AWinControl.Parent), PageIndex);
if RealIndex <> -1 then
Windows.SendMessage(PageControlHandle, TCM_DELETEITEM,
Windows.WPARAM(RealIndex), 0);
begin
Windows.SendMessage(PageControlHandle, TCM_DELETEITEM, Windows.WPARAM(RealIndex), 0);
AWinControl.Parent.InvalidateClientRectCache(False);
end;
end;
TWSWinControlClass(ClassParent).DestroyHandle(AWinControl);
end;