mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 16:31:40 +02:00
lcl: set caption for TCustomPage even it is has not handle allocated but parent has since page caption belongs to pagecontrol, not the page (bug #0011888)
git-svn-id: trunk@18184 -
This commit is contained in:
parent
75f25dfbab
commit
37e866d1ea
@ -70,6 +70,7 @@ type
|
||||
procedure DoHide; dynamic;
|
||||
procedure DoShow; dynamic;
|
||||
procedure DestroyHandle; override;
|
||||
procedure RealSetText(const AValue: TCaption); override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
procedure AdjustClientRect(var ARect: TRect); override;
|
||||
|
@ -203,6 +203,18 @@ begin
|
||||
Exclude(FFlags,pfAdded);
|
||||
end;
|
||||
|
||||
procedure TCustomPage.RealSetText(const AValue: TCaption);
|
||||
begin
|
||||
if (Parent <> nil) and Parent.HandleAllocated and (not (csLoading in ComponentState)) then
|
||||
begin
|
||||
WSSetText(AValue);
|
||||
InvalidatePreferredSize;
|
||||
inherited RealSetText(AValue);
|
||||
AdjustSize;
|
||||
end
|
||||
else inherited RealSetText(AValue);
|
||||
end;
|
||||
|
||||
function TCustomPage.IsControlVisible: Boolean;
|
||||
begin
|
||||
if Parent is TCustomNotebook then
|
||||
|
Loading…
Reference in New Issue
Block a user