Jump to content

Recommended Posts

  • 2 weeks later...
Posted

English:

Hi Carlos, here is the code for creating a TUnimForm at runtime by the class name. I hope be useful to you.

 

Spanish:

Hola Carlos, acá te mando el código para crear una TUnimForm en tiempo de ejecución por el nombre de la clase. Espero te sea de utilidad.

 

MobileForm.zip

  • 1 year later...
Posted
procedure TMainmForm.ShowFrame(AClass: string);

var

  FFrame : TUniFrame;

  FrC : TUniFrameClass;

begin

     FrC := TUniFrameClass(FindClass(AClass));

     if frc <> nil then

     begin

          FFrame := TUniFrameClass(FindClass(AClass)).Create(Self);

          if FFrame <> nil  then

          begin

               FFrame.Align := alClient;

               FFrame.Parent := ContainerPanel;

          end;

     end;

end;

Posted

Be more specific, you just wondered how you could do the same situation with frames.

If you are wanting to create the same frame several times, create each one (instance) with a unique name.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...