[lazarus] CreateComponent

Shane Miller SMiller1 at stvgb.org
Mon Aug 16 10:07:40 EDT 1999


Can we?  SURE!  We did it this way because that's how it worked best for GTK.  If someone wants to add the handleneeded procedure in TCONTROL and do the creation there, that would be fine.  We just have to make sure that we are using the "parent" property then and having the user set it (Lazarus will set it eventually).  Then when the parent is set, I assume that HANDLENEEDED is called if no handle exists....

Anyone want to implement this?  You will have to move any CREATECOMPONENT calls out of the specific components into the handleneeded.....

Shane


>>> "Samuel Liddicott" <sam at campbellsci.co.uk> 08/16 8:33 AM >>>
It seems like (to pick an example) TLabel makes it's GTK object in the
contructor.  This is a bit early.

Can't we delay gtk-creation until HandleNeeded is called?  Its the Delphi
way.
In fact can't we do it in the CreateWindow function?

Am I being too fussy spotting windows divergances here? - but this one is
important to me.

Sam

_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list