[lazarus] TNoteBook probems Fixed
Michael Van Canneyt
michael.vancanneyt at wisa.be
Thu Sep 30 05:16:05 EDT 1999
On Thu, 30 Sep 1999, Gertjan Schouten wrote:
> > * A control should never be part of its own controls collection. In my
> > debugmessages I see constructions like:
> > [TWinControl.Remove] TBUTTON --> Remove: TBUTTON ()
> > [TWinControl.Insert] TPAGE --> Insert: TBUTTON ()
> > and it looks like the parent of TBUTTON was TBUTTON itself.
> > Something similar: A form has no parent and while looping through the
> > controls collection, you'll find the form as Controls[0]
>
> Parent in TForm has only meaning if the form is an MDIChild.
> Setting the FormStyle of a Form to fsMDICHILD sets the Parent
> property to Application.MainForm, otherwise Parent is always NIL
Actually, there is a trick that allows you to set parent to an arbitrary form.
it's documented in Charlie Calvert's book on Delphi.
Michael.
More information about the Lazarus
mailing list