[Lazarus] embedding fomrs into forms
Bogusław Brandys
brandys at o2.pl
Sat May 17 16:38:41 CEST 2008
Marc Santhoff wrote:
> Am Samstag, den 17.05.2008, 14:15 +0200 schrieb Marc Santhoff:
>> Hi,
>>
>> 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.
>
> Testing showed it does not work, if done like this:
>
> procedure TForm1.FormCreate(Sender: TObject);
> var
> f2: TForm;
> begin
> f2 := TForm2.Create(Panel2);
> f2.show;
> end;
>
> the secomd form is shown seperately and managed by the window manager.
> Using MDI didn't do it either.
>
>> If it is not possible, what alternative ways of designing something like
>> that should I consider?
>
> The last possibilities I see are streaming parts of the form myself or
> using the dock manager thingy. Can someone explain how docking would be
> done (or point me to the docs), please?
>
> Marc
procedure TForm1.FormCreate(Sender: TObject);
var
f2: TForm;
begin
f2 := TForm2.Create(Panel2);
f2.Parent := Panel2;
f2.show;
end;
More information about the Lazarus
mailing list