On 3 June 2010 17:24, Michael Van Canneyt <mich...@freepascal.org> wrote:
>
> You must override GetChildren.
>
> In the LCL, TWinControl overrides GetChildren to write child controls.
>
> It is documented.

But why is GetChildren needed? Why can't TWriter use ComponentCount
and Components[] like I have done in the TraverseComponents()
recursive procedure?

Also I saw this comment in LCL's TCustomForm.GetChildren

"  Adds component to children list which have no parent.
    (TWinControl only lists components with parents) "

Is that still true?  In fpGUI I set Owner and Parent. What is
different in fpGUI (compared to LCL or VCL) is that Owner = Parent,
always. I don't see a need for them to be different - one widget can
just as easily manage the lifespan of another widget. Re-parenting a
widgets also works in fpGUI, by simply transferring the ownership to
the new parent widget (inserting into Components[] array).


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to