Site icon Python GUI

How to use the Caption Property

focused black businesswoman using laptop

Photo by Ono Kosuki on Pexels.com

We use Caption to specify a text string that identifies the control to the user.

To underline a character in a Caption that labels a component, include an ampersand (&) before the character. This type of character is called an accelerator character. The user can then select the component by pressing ALT while typing the underlined character. To display an ampersand character in the caption, use two ampersands (&&).

Notes:

Here is the working example of the implementation of Caption to initialize the base form:

[crayon-662a687b20b28128972433/]

 

Here is the working example of the implementation of Caption in the main panel creation:

[crayon-662a687b20b31683413590/]

 

Here is the working example of the implementation of Caption in the tabsheet creation:

[crayon-662a687b20b32911482712/]

 

Here is the working example of the implementation of Caption in the label creation:

[crayon-662a687b20b33178798957/]

 

Here is the working example of the implementation of Caption in the check box creation:

[crayon-662a687b20b34454245864/]

 

Here is the working example of the implementation of Caption in the radiogroup creation:

[crayon-662a687b20b36128287545/]

 

Here is the working example of the implementation of Caption in the button creation:

[crayon-662a687b20b38666188398/]

 

Here is the working example of the implementation of Caption in the button onclick event:

[crayon-662a687b20b39396999517/]

 

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

Exit mobile version