Site icon Python GUI

Create an Edit Controls using DelphiVCL.Edit or TEdit

woman wearing red and black checkered blouse using macbook

Photo by Christina Morillo on Pexels.com

DelphiVCL.Edit or TEdit is a wrapper for a Windows single-line edit control.

We can use an Edit object to put a standard Windows edit control on a form. Edit controls are used to retrieve text that users type. Edit controls can also display text to the user.

When only displaying text to the user, choose an edit control to allow users to select text and copy it to the Clipboard. Choose a label object if the selection capabilities of an edit control are not needed.

Edit implements the generic behavior introduced in CustomEdit. Edit publishes many of the properties inherited from CustomEdit, but does not introduce any new behavior. For specialized edit controls, use other descendant classes of CustomEdit or derive from it.

We can browse all the properties, methods, and built-in properties of the DelphiVCL.Edit using dir() command:

[crayon-6623931ee4ad9652826594/]

See the responses in command prompt:

Here is the working example of the implementation of DelphiVCL.Edit to create an Edit Box inside our form:

[crayon-6623931ee4ae5688196960/]

To see the result, let’s run the complete script:

[crayon-6623931ee4ae8830602386/]

The result:

 

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

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

Exit mobile version