Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

How do I add items to list boxes or combo boxes?

Updated on September 10, 2021

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:

  1. Highlight the control in Object Explorer.
  2. Click Explore Component Properties at the top of Object Explorer.
    Select listBox1 in the Object Explorer

  3. On the list of properties that displays, highlight the Items property.
    Select Items in the Object Explorer
  1. To see a list of available properties and methods, click Configure Type.
  2. In the Configuration dialog, click the methods that you want to use and click OK. The methods that you selected display in the Object Explorer. Commonly used methods are displayed in the following list:
    • 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 following automation shows how you can add and remove items from a list box:

Connection block example using the AddRange(Object[]) method

Connection block example using the Add method

  • Previous topic How can I get the elements from an array?
  • Next topic How do I configure Robotic Automation for Pega Platform applications?


Robotics System Architect Robotic Process Automation

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us