DelphiDelphiVCLPythonPython GUIWindows

Add Strings to Various Components using .Items

photo of woman holding a gray laptop in front of systems

Description

In previous examples, we already use .Items several times (see Getting Started with DelphiVCL III: Overview of Commonly used VCL Components). We use it in ListBox, ComboBox, and RadioGroup. Items contain the strings that appear in the ListBox, ComboBox, and RadioGroup.

Use Items to add, insert, delete, and move items. By default, the items in a list box are of type Strings. Use this item type to access its methods or properties to manipulate the items in the list.

Code example

Here is the working example of the implementation of .Items in the list box:

The result:

1 1 7151798

Here is the working example of the implementation of .Items in combo box:

The result:

1 2 7158822

Here is the working example of the implementation of .Items in radio group:

The result:

1 3 9340754

Note for beta release users

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

  • Release version: 
  • Beta version:

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

Also, watch the following webinar by Ian Barker on How to create a real Windows app step-by-step guide:


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] Embarcadero DocWiki. (2012). 

Vcl.StdCtrls.TListBox.Items. Embarcadero DocWiki. Embarcadero Technologies. docwiki.embarcadero.com/Libraries/Sydney/en/Vcl. StdCtrls.TListBox.Items

[2] Embarcadero DocWiki. (2012). 

Vcl.StdCtrls.TComboBox.Items. Embarcadero DocWiki. Embarcadero Technologies. docwiki.embarcadero.com/Libraries/Sydney/en/Vcl. StdCtrls.TComboBox.Items

[3] Embarcadero DocWiki. (2012). 

Vcl.ExtCtrls.TRadioGroup.Items. Embarcadero DocWiki. Embarcadero Technologies. docwiki.embarcadero.com/Libraries/Sydney/en/Vcl. ExtCtrls.TRadioGroup.Items

Related posts
CodeIDEProjectsPythonWindows

Unlock the Power of Python for Deep Learning with Diffusion Model - The Engine behind Stable Diffusion

CodeIDELearn PythonPythonPython GUITkinter

How To Make More Than 20 ChatGPT Prompts Work With Python GUI Builders And OpenCV Library?

CodeIDEProjectsPythonWindows

Unlock the Power of Python for Deep Learning with Radial Basis Function Networks (RBFNs)

CodeIDELearn PythonPythonPython GUITkinter

How To Make More Than 20 ChatGPT Prompts Work With Python GUI Builders And NumPy Library?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.