> My problem was that the Create method wanted to TTreeView and Self was a
> form. There was no other code other than the standard Delphi stuff for a
form
the following modification of your original post works (for me anyway).
I don't think there is a problem using self (i.e. the form) as owner:
TMyList=class(TTreeview);
PMyList = ^TMylist;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
MyList1: TMyList;
begin
MyList1 := TMyList.Create(self);
MyList1.Parent := Self;
MyList1.Visible := True;
end;
-ns
with one button and the unit that had the my class in it. The only code in
this
unit was a Create method the called the inherited method. I do not think
that
the other code was causing the problem but what fixed it was using "nil".
Chrissy.
---------------------------------------------------------------------------
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"
---------------------------------------------------------------------------
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"