Einzelnen Beitrag anzeigen

Rollo62

Registriert seit: 15. Mär 2007
3.917 Beiträge
 
Delphi 12 Athens
 
#4

AW: FMX Form in einen anderen einbetten

  Alt 14. Sep 2017, 19:16
Probier mal das hier :

Delphi-Quellcode:
// AForm is newly created externally and then can be
//embedded to a control, such as a panel or a tabsheet.
procedure Form_Embed_To(const AForm:TCustomForm; const AParent:TControl);
var
  chld: TFmxObject;
  I: Integer;
begin
  if Assigned( AParent ) then
  begin
      AParent.BeginUpdate;

      I := 0;
      while AForm.ChildrenCount > 0 do
      begin
        chld := AForm.Children[I];
        if chld.Name <> 'then
          AForm.Children[I].Parent := AParent
        else
          Inc(I);
      end;

      AParent.EndUpdate;
  end;
end;
Rollo
  Mit Zitat antworten Zitat