By default a new control doesn't have a parent. Add the following line:
Planner.Parent := Self;
Cheers,
David.
DB Solutions.
> Hi all.
>
> I have just created a component subclassed of a TPanel.
>
> I am trying to create another control inside the TPanel like so......
>
> ************
> constructor TCustomPanel2.Create(aOwner:TPanel);
> begin
> inherited create(AOwner);
>
> Planner := TPegPlanner.create(Self);
>
> Planner.left:=10;
> Planner.top:=10;
> Planner.width:=150;
> planner.height:=150;
> Planner.visible:=true;
> end;
> ************
>
> BUT the control does not appear ontop of the TPanel. Can anyone see why
???
>
> Cjeers, Jeremy Coulter
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"