GetListBoxItems

Return a list of items in a list box Control.

IList<string> GetListBoxItems();

Parameters

None

Return Value

A list of items in the listbox.

Example

Control dialog = FindTopWindow("My Dialog"); // find the top window with the caption "My Dialog"

Control listBox = dialog.FindControl("myListBox", "ListBox"); // get the listbox item named "myListBox"

IList<string> listBoxItems = listBox.GetListBoxItems();

 

foreach(string item in listBoxItems)

{

WriteMessage("item=" + item);

}

 

listBox.SelectListBoxItem("cheese"); // select a listbox item

Related:

 

This topic was last updated on June 21, 2019, at 02:49:50 PM.

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