mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 14:29:39 +02:00
fixed triggering TDataModule, and improved parent search for new designer controls. from Jesus
git-svn-id: trunk@7137 -
This commit is contained in:
parent
5e5c593414
commit
18509cdbd9
@ -1252,12 +1252,18 @@ Begin
|
||||
// create component interface
|
||||
Temp := TComponentInterface.Create(NewComponent);
|
||||
// calc parent
|
||||
if (ParentComponent is TWinControl)
|
||||
and (csAcceptsControls in TWinControl(ParentComponent).ControlStyle) then
|
||||
begin
|
||||
AParent := TWinControl(ParentComponent);
|
||||
end else begin
|
||||
AParent := TControl(ParentComponent).Parent;
|
||||
AParent:=nil;
|
||||
if ParentComponent is TControl then begin
|
||||
if (ParentComponent is TWinControl) then
|
||||
AParent:=TWinControl(ParentComponent)
|
||||
else
|
||||
AParent:=TControl(ParentComponent).Parent;
|
||||
while (AParent<>nil) do begin
|
||||
if (AParent is TWinControl)
|
||||
and (csAcceptsControls in AParent.ControlStyle) then
|
||||
break;
|
||||
AParent:=AParent.Parent;
|
||||
end;
|
||||
end;
|
||||
DebugLn('Parent is '''+dbgsName(AParent)+'''');
|
||||
end else begin
|
||||
|
@ -1432,7 +1432,7 @@ begin
|
||||
ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
{$IFNDEF AfterConstructionDataModuleNotWorking}
|
||||
{$IFDEF AfterConstructionDataModuleNotWorking}
|
||||
if (Instance is TDataModule) then begin
|
||||
TDataModule(instance).AfterConstruction;
|
||||
end;
|
||||
@ -1466,6 +1466,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.119 2005/05/03 16:52:29 mattias
|
||||
fixed triggering TDataModule, and improved parent search for new designer controls. from Jesus
|
||||
|
||||
Revision 1.118 2005/04/20 07:14:00 mattias
|
||||
moved THintInfo from forms.pp to controls.pp and changed TControlShowHint event from pointer to PHintHinfo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user