Site icon Python GUI

Getting Started with DelphiVCL: Simple Windows Form Example In Python

featuredimage2

In essence, DelphiVCL is a wrapper that helps to create and access Delphi Objects quickly from Python. These wrappers contain container classes to extend and expose your custom events, methods, variables that can be used in Python script.Here is a Python code sample using DelphiVCL to create a simple Form app with a list, edit, and button:

[crayon-6623114118edb729890493/]

Here is the GUI created by the Python code above. You can run it using your favorite Python IDE, which for me is PyScripter:

Or you can save the script first, and run it through the command line using this command:

[crayon-6623114118ee5392524497/]

This GUI expects user inputs. Clicking the button will add the text from the edit box to the list box:

Note for beta release users

In practice, the only difference between DelphiVCL for Python release version and the beta version is only in how you write the DelphiVCL. Here is the example for how you import the library:

[crayon-6623114118ee8844183191/]
[crayon-6623114118ee9366054718/]

Watch this comprehensive introduction to Python GUI Development with DelphiVCL library video by Jim McKeeth:


Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.

Check out Python4Delphi which easily allows you to build Python GUIs for Windows using Delphi.


References & further readings

[1] Anbarasan. (2021). 

Quickly Build Ultra-Modern Python Native Windows GUIs With Delphi. PythonGUI.org. Embarcadero Technologies. pythongui.org/quickly-build-ultra-modern-python-native-windows-guis-with-delphi

Exit mobile version