mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-22 18:48:25 +02:00
LCL: Update Caption of a TPageControl when something is docked there. Issue #40741, patch by Anton Kavalenka.
This commit is contained in:
parent
85bf6be863
commit
d944f9f554
@ -592,6 +592,7 @@ type
|
|||||||
procedure DoRemoveDockClient(Client: TControl); override;
|
procedure DoRemoveDockClient(Client: TControl); override;
|
||||||
function DoUndockClientMsg(NewTarget, Client: TControl):boolean; override;
|
function DoUndockClientMsg(NewTarget, Client: TControl):boolean; override;
|
||||||
function ChildClassAllowed(ChildClass: TClass): boolean; override;
|
function ChildClassAllowed(ChildClass: TClass): boolean; override;
|
||||||
|
procedure UpdateDockCaption(Exclude: TControl = nil); override;
|
||||||
public
|
public
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
function FindNextPage(CurPage: TTabSheet;
|
function FindNextPage(CurPage: TTabSheet;
|
||||||
|
@ -116,7 +116,15 @@ begin
|
|||||||
if Widgetset.GetLCLCapability(lcAllowChildControlsInNativeControls) = LCL_CAPABILITY_YES then Result := True;
|
if Widgetset.GetLCLCapability(lcAllowChildControlsInNativeControls) = LCL_CAPABILITY_YES then Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TPageControl.UpdateDockCaption(Exclude: TControl = nil);
|
||||||
|
var
|
||||||
|
i:integer;
|
||||||
|
begin
|
||||||
|
for i:=0 to Self.PageCount-1 do
|
||||||
|
with Pages[i] do
|
||||||
|
if ControlCount>0 then
|
||||||
|
Caption:=Controls[0].Caption;
|
||||||
|
end;
|
||||||
|
|
||||||
function TPageControl.FindNextPage(CurPage: TTabSheet; GoForward,
|
function TPageControl.FindNextPage(CurPage: TTabSheet; GoForward,
|
||||||
CheckTabVisible: Boolean): TTabSheet;
|
CheckTabVisible: Boolean): TTabSheet;
|
||||||
|
Loading…
Reference in New Issue
Block a user