Jump to content

[MOVILE]How to create a mobile form by name


asapltda
 Share

Recommended Posts

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 1 year later...
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;

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...