mfoster711
12 years agoRegular Contributor
User Form text of selected item
How do you get the text of the currently selected item in a tcxListBox control of a User Form? I seem to be spinning my wheels and not finding the solution.
- 12 years ago
Hi Mark
According to this article http://support.smartbear.com/viewarticle/28763/
The ItemIndex property specifies the index of the currently selected list box item.
The Items property returns the TStrings which contains the list of strings displayed by the component.
So this would get the text of the currently selected item
Set TStringsObj = TcxListBoxObj.Items
String = TStringsObj.Items(TcxListBoxObj.ItemIndex)