Bisma Jayadi schreef:
Hi all...
I used to use this trick to get a panel as container for a form on
Delphi (7). This trick works very well on Delphi. The trick is about
displaying a form (TForm) inside a panel (TPanel) as the form container.
It's like TFrame but we can attach any regular forms instead of a frame
and we can attach any forms on runtime.
The code is like this...
procedure TParentForm.AttachForm(AChildFormClass: TCustomFormClass);
begin
// FChildForm is a private TCustomForm of TParentForm
FreeAndNil(FChildForm);
// assign other form to FChildForm and attach it to a panel
FChildForm := AChildFormClass.Create(nil);
FChildForm.Top := 1;
FChildForm.Left := 1;
FChildForm.BorderStyle := bsNone;
FChildForm.Parent := PanelContainer;
FChildForm.Show;
end;
But the code seems not work on Lazarus (I use 0.9.14.1). No errors is
raised, but the panel is empty (the child form failed to attach).
Is there any explanation about this? Thanks.
I don't have an explanation, I just know it doesn't work.
See also: http://www.lazarus.freepascal.org/mantis/view.php?id=1052
Vincent.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives