mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-21 21:48:16 +02:00
LCL: TNotebook: fixed updating FShowing on switching PageIndex by user, fixes invisible controls at designtime
git-svn-id: trunk@15937 -
This commit is contained in:
parent
af49852343
commit
3af4740453
@ -1498,6 +1498,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
// redirect messages to designer
|
// redirect messages to designer
|
||||||
Form := GetParentForm(Self);
|
Form := GetParentForm(Self);
|
||||||
|
//debugln(['TControl.WndProc ',dbgsname(Self)]);
|
||||||
if (Form <> nil) and (Form.Designer <> nil)
|
if (Form <> nil) and (Form.Designer <> nil)
|
||||||
and Form.Designer.IsDesignMsg(Self,TheMessage) then begin
|
and Form.Designer.IsDesignMsg(Self,TheMessage) then begin
|
||||||
Exit;
|
Exit;
|
||||||
|
@ -865,6 +865,7 @@ var
|
|||||||
FocusHandle : HWND;
|
FocusHandle : HWND;
|
||||||
MenuItem : TMenuItem;
|
MenuItem : TMenuItem;
|
||||||
begin
|
begin
|
||||||
|
//debugln(['TCustomForm.WndProc ',dbgsname(Self)]);
|
||||||
with TheMessage do
|
with TheMessage do
|
||||||
case Msg of
|
case Msg of
|
||||||
LM_ACTIVATE, LM_SETFOCUS, LM_KILLFOCUS:
|
LM_ACTIVATE, LM_SETFOCUS, LM_KILLFOCUS:
|
||||||
|
@ -780,6 +780,7 @@ end;
|
|||||||
procedure TCustomNotebook.CNNotify(var Message: TLMNotify);
|
procedure TCustomNotebook.CNNotify(var Message: TLMNotify);
|
||||||
var
|
var
|
||||||
OldPageIndex: LongInt;
|
OldPageIndex: LongInt;
|
||||||
|
APage: TCustomPage;
|
||||||
begin
|
begin
|
||||||
with Message do
|
with Message do
|
||||||
case NMHdr^.code of
|
case NMHdr^.code of
|
||||||
@ -801,6 +802,11 @@ begin
|
|||||||
//DebugLn(['TCustomNotebook.CNNotify ',DbgSName(Page[PageIndex]),' ',Page[PageIndex].Visible]);
|
//DebugLn(['TCustomNotebook.CNNotify ',DbgSName(Page[PageIndex]),' ',Page[PageIndex].Visible]);
|
||||||
ResizeDelayedAutoSizeChildren;
|
ResizeDelayedAutoSizeChildren;
|
||||||
Change;
|
Change;
|
||||||
|
if FPageIndex>=0 then begin
|
||||||
|
APage:=Page[FPageIndex];
|
||||||
|
// update FShowing
|
||||||
|
APage.UpdateShowing;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -208,7 +208,6 @@ begin
|
|||||||
if Parent is TCustomNotebook then
|
if Parent is TCustomNotebook then
|
||||||
begin
|
begin
|
||||||
Result := (PageIndex = TCustomNotebook(Parent).PageIndex);
|
Result := (PageIndex = TCustomNotebook(Parent).PageIndex);
|
||||||
//if Name='FormEditorPage' then DebugLn(['TCustomPage.IsControlVisible PageIndex=',PageIndex,' Parent.PageIndex=',TCustomNotebook(Parent).PageIndex]);
|
|
||||||
end else begin
|
end else begin
|
||||||
Result := inherited IsControlVisible;
|
Result := inherited IsControlVisible;
|
||||||
end;
|
end;
|
||||||
|
@ -5580,6 +5580,7 @@ begin
|
|||||||
if not (csDestroying in ComponentState) then
|
if not (csDestroying in ComponentState) then
|
||||||
AControl.RequestAlign;
|
AControl.RequestAlign;
|
||||||
Perform(CM_CONTROLCHANGE, WParam(AControl), LParam(True));
|
Perform(CM_CONTROLCHANGE, WParam(AControl), LParam(True));
|
||||||
|
//debugln(['TWinControl.InsertControl ',DbgSName(Self),' ',csDesigning in ComponentState,' ',DbgSName(AControl),' ',csDesigning in AControl.ComponentState]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user