How do I add items to list boxes or combo boxes?
To add or remove items from a list box or combo box control, you must access methods for the Items property. Perform the following steps:
- Highlight the control in Object Explorer.
- Click
- On the list of properties that displays, highlight the Items property.
- To see a list of available properties and methods, click .
- In the Configuration dialog, click the methods that you want to use and click
- Items.Add – Adds an item at the specified index.
- Items.AddRange – There are two AddRange methods, AddRange(ObjectCollection value) and AddRange((Object[] items). To add an array of items, use the AddRange(Objec[] items) method.
- Items.Clear – Removes all items from the list box or combo box.
- Items.Remove – Removes the item with the specified value.
- Items.RemoveAt – Removes the item at the specified index.
. The methods that you selected display in the Object Explorer. Commonly used methods are displayed in the following list:
The following automation shows how you can add and remove items from a list box:
Previous topic How can I get the elements from an array? Next topic How do I configure Robotic Automation for Pega Platform applications?