[Lazarus] fpGUI

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Jan 17 07:43:43 CET 2011


Op 2011-01-17 04:50, Hans-Peter Diettrich het geskryf:
>> In fpGUI there is no "new AutoSize" and also there is no "FormCreate",
>> because in fpGUI the convention is to create controls in "AfterCreate"
>> which is a virtual method and not an event.
> 
> So fpGUI has no Delphi compatible FormCreate handlers?

By FormCreate, I assume you mean TForm.OnCreate event and FormCreate
(which can actually have any name) being the event handler for OnCreate?
Is so, obviously yes, fpGUI does have the OnCreate event.


>> Also fpGUI does not rely on component streaming and thus the
>> visibility of component fields can be as low as private without problems.
> 
> This is what FPC disallows. When the code in AfterCreate sets a property
> of a child control, then that property must be at least public.

I think he worded it wrong. I assume he meant that "component fields"
being the componens dropped on a designer form. Under Delphi and Lazarus
those field variables must be located in the Published section of a
Form. In fpGUI they are by default Private and in fact can be in any
visibility section of a Form.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/





More information about the Lazarus mailing list