GetComboBoxItems

Return a list of the items in a windows combo box Control.

IList<string> GetComboBoxItems();

Parameters

None

Return Value

A list of items in the combo box.

Example

Control setupDialog = FindTopWindow("Page Setup"); // find the top window with the caption "Page Setup"

IList<Control> comboBoxes = setupDialog.FindControls(null, "ComboBox"); // get a list of combo box controls

IList<string> comboBoxItems = comboBoxes[0].GetComboBoxItems(); // get the list of strings in the first combo box

 

foreach(string item in comboBoxItems)

{

WriteMessage("item=" + item);

}

 

comboBoxes[0].SelectComboBoxItem("A4"); // select the combo box item A4

 

This topic was last updated on January 13, 2022, at 02:42:23 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2022 Eggplant