Parent: IComponent;
The Parent property determines a parent form for the component.
This property must be specified on dynamic creating of the DropForm component.
Executing the example requires a form and a button named Button1 on it. The repository contains a form with the FORM_FOR_DROPFORM identifier that is used as a drop-down form in the DropForm component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
NewDropForm: DropForm;
Begin
NewDropForm := New DropForm.Create;
NewDropForm.AnimationType := DropAnimationType.Center;
NewDropForm.Parent := Self;
NewDropForm.MetabaseObject := "FORM_FOR_DROPFORM";
NewDropForm.DropHeight := 100;
NewDropForm.DropWidth := 100;
NewDropForm.SizeGrip := True;
NewDropForm.DropDown(Self, 10, 10);
End Sub Button1OnClick;
On clicking the button a new DropForm component is created dynamically. The required parameters are set, after that the form linked to the component is expanded.
See also: