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 January 13, 2022, at 02:42:23 PM.

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