DelphiVCL4Python - VCL.DesignExport Samples
This is a sample set that shows the use of the Export to Python directly from a Delphi form.
You can find the DesignExport samples at:
- GitHub Repository for DelphiVCL4Python: https://github.com/Embarcadero/DelphiVCL4Python/tree/main/samples/DesignExport
This application demonstrates the Export to Python routine and shows how to export a Delphi Design form to Python:
- Open the Experts folder and install the dclDelphiVCLExperts component:
-
Once installed, now you're able to export any TForm descendant.
-
Under DesignExport/ choose a sample and open the given project.
-
Using the Form View, left window Structure->||FORM_NAME|| or on the Form Design.
-
Press right click and choose Export to Delphi.
-
A save dialog is displayed. Save it with the same name of the form (by default) - a .py and .pydfm file will be created.
-
Don't forget to include the app initialization onto your module:
def main():
Application.Initialize()
Application.Title = "DelphiDesignExport"
MainForm = MainForm(Application)
MainForm.Show()
FreeConsole()
Application.Run()
MainForm.Destroy()
if __name__ == '__main__':
main()