[Lazarus] fpGUI

Graeme Geldenhuys graemeg.lists at gmail.com
Sun Jan 16 18:59:10 CET 2011


On Sun, 2011-01-16 at 17:18 +0100, Hans-Peter Diettrich wrote:
> > AfterCreate is a virtual method that gets called in a base form class in
> > the AfterConstructor method.
> 
> What about code in FormCreate?

Mixing where you create UI components is your problem. The UI Designer
uses AfterCreate (though I should probably give this a better name some
time). If you create components before of after that method - well see
what happens at runtime. Same as in LCL.

The fpGUI UI Designer on the other hand will only load and edit what is
between the @VFD_ comment markers. And yes, you can move those comment
markers to a form's constructor or OnShow event handler etc, and it will
work as normal when you edit the form visually.


> Nonetheless the visibility of the component properties cannot be reduced 
> much. It must stay public, so that the properties are accessible in 
> AfterCreate. The same with Frames...

Components are a different point - I was referring to Form class (eg:
TMainForm) only.


-- 
Regards,
 - Graeme -

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





More information about the Lazarus mailing list