Owners and Parents Was: Re: [lazarus] Creating Components...
Jeffrey A. Wormsley
daworm at cdc.net
Fri Aug 13 00:31:12 EDT 1999
>For instance if you execute the following in a OnCreate event an instance
>of the button is created, but no Graphical/Windows part.
> TButton.Create(Self);
>
>If you pass a parent, the graphical part gets created as well.
> TButton.Create(Self).Parent := Self;
How is this supposed to be handled? If I understand correctly, windows
will automatcally destroy any window children when the parent destroy is
called. If you create a window with no parent, this does not happen. How
do you, after the create, tell a window that it has a parent, when it did
not have one when it was created?
Jeff.
More information about the Lazarus
mailing list