mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 11:39:23 +02:00
LCL: Allow overriding resource loading in TCustomForm. Issue #20358, patch from Anton Kavalenka.
git-svn-id: trunk@50911 -
This commit is contained in:
parent
894c125543
commit
08f907306b
@ -557,6 +557,7 @@ type
|
|||||||
procedure SetAutoScroll(Value: Boolean); override;
|
procedure SetAutoScroll(Value: Boolean); override;
|
||||||
procedure DoAddActionList(List: TCustomActionList);
|
procedure DoAddActionList(List: TCustomActionList);
|
||||||
procedure DoRemoveActionList(List: TCustomActionList);
|
procedure DoRemoveActionList(List: TCustomActionList);
|
||||||
|
procedure ProcessResource;virtual;
|
||||||
protected
|
protected
|
||||||
// drag and dock
|
// drag and dock
|
||||||
procedure BeginAutoDrag; override;
|
procedure BeginAutoDrag; override;
|
||||||
|
@ -1966,12 +1966,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Include(FFormState, fsCreating);
|
Include(FFormState, fsCreating);
|
||||||
try
|
try
|
||||||
if not InitResourceComponent(Self, TForm) then
|
ProcessResource;
|
||||||
if RequireDerivedFormResource then
|
|
||||||
raise EResNotFound.CreateFmt(
|
|
||||||
rsFormResourceSNotFoundForResourcelessFormsCreateNew, [ClassName])
|
|
||||||
else
|
|
||||||
DebugLn(Format(rsFormResourceSNotFoundForResourcelessFormsCreateNew, [ClassName]));
|
|
||||||
finally
|
finally
|
||||||
Exclude(FFormState, fsCreating);
|
Exclude(FFormState, fsCreating);
|
||||||
end;
|
end;
|
||||||
@ -1981,6 +1976,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomForm.ProcessResource;
|
||||||
|
begin
|
||||||
|
if not InitResourceComponent(Self, TForm) then
|
||||||
|
if RequireDerivedFormResource then
|
||||||
|
raise EResNotFound.CreateFmt(
|
||||||
|
rsFormResourceSNotFoundForResourcelessFormsCreateNew, [ClassName])
|
||||||
|
else
|
||||||
|
DebugLn(Format(rsFormResourceSNotFoundForResourcelessFormsCreateNew, [ClassName]));
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
constructor TCustomForm.CreateNew(AOwner: TComponent; Num : Integer);
|
constructor TCustomForm.CreateNew(AOwner: TComponent; Num : Integer);
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
|
Loading…
Reference in New Issue
Block a user