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 October 11, 2019, at 11:19:01 AM.

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