LCL: Add TCustomFrame.CreateParams. Somehow fixes issue #25124.

This commit is contained in:
Juha 2021-11-29 02:29:33 +02:00
parent 171f18dd75
commit 20c1e10aca
2 changed files with 8 additions and 0 deletions

View File

@ -314,6 +314,7 @@ type
procedure DefineProperties(Filer: TFiler); override;
procedure CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean); override;
procedure CreateParams(var Params: TCreateParams); override;
procedure UpdateOpaque;
public
constructor Create(AOwner: TComponent); override;

View File

@ -197,6 +197,13 @@ begin
WithThemeSpace);
end;
procedure TCustomFrame.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
if (Parent = nil) and (ParentWindow = 0) then
Params.Style := Params.Style and not Cardinal(WS_GROUP or WS_TABSTOP or WS_CHILD);
end;
procedure TCustomFrame.UpdateOpaque;
begin
if ParentBackground then