[Lazarus] embedding fomrs into forms

Mattias Gaertner nc-gaertnma at netcologne.de
Sat May 17 16:30:46 CEST 2008


On Sat, 17 May 2008 16:34:57 +0300
"Kostas Michalopoulos" <badsector at slashstone.com> wrote:

> It is possible. Check the Lazarus Forum for a procedure i posted a
> while back that embeds a form inside a TWinControl by reparenting the
> form controls and keeping the form itself in memory so local (in form
> class) variables will still work.
> 
> However currently it is not possible to use LCL with a DLL. I tried
> it, in order to create a control from a DLL that will be used and it
> failed (crashes, etc). I don't know enough about LCL internals to say
> why though.

Note:
Nesting TForm or TFrame inside a TForm is possible. Just set the
'Parent' property and when embedding a form, make sure to set the
BorderStyle to bsNone. 
The IDE designer does not yet allow to _nest_ forms in the
designer (I'm working on that, but I guess it will take a month before
it becomes ready and stable). Of course you can design forms.
_Designing_ frames is still experimental.

Putting LCL controls into a dynamic linked library is only possible
with more or less dirty tricks. This is independent of nesting forms.


Mattias


> > is it possible to use a TForm inside a TForm?
> >
> > Imagine a program consisting of a frame and some plug-ins. The
> > plug-ins should get designed using lazarus, each having it own
> > form. When loaded those forms would be embedded into the main
> > applications form as a frame, e.g. each on a tab of a notebook or
> > similar.
> >
> > If it is not possible, what alternative ways of designing something
> > like that should I consider?
> >
> > TIA,
> > Marc
> >
> >
> > _______________________________________________
> > Lazarus mailing list
> > Lazarus at lazarus.freepascal.org
> > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus 
> 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus



More information about the Lazarus mailing list