Class
- ComboBox
- ListBox
- ListView
- PopupList
- RadioList
Action
Returns the text of the selected item in the combo box, list, single-selection list box or listview, popup list, or radiolist.
Availability
This functionality is supported only if you are using the Classic Agent.
Syntax
sText = list.GetSelText( )
Variable
|
Description
|
sText
|
The text of the selected item.
STRING.
|
Notes
- GetSelText returns the text of the selected item in the list. If nothing is selected,
GetSelText returns an empty string (""). If the item selected contains no text or is graphical,
GetSelText returns a pound sign (#) followed by the index number of the item.
- The
GetSelText function is not available in the
ListViewEx class, which is the equivalent of the
ListView class on the Open Agent. To achieve the same functionality for a listview on the Open Agent, use the
SelectedItems property and the
GetItemText method of the
ListViewEx class. For example, to retrieve the text of the third selected element in a listview, use the following:
SelectedItems[3].GetItemText()
Example
STRING sSelected
sSelected = Find.Direction.GetSelText()