listbox
hi everyone, how can I know whether an item is selected or not in listbox?
if any of the item selected, I want to do 'x' thing
if not any of the item selected, I want to do 'y' thing
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vimal KandasamyPosted May 9, 2009, 3:39 AM
{{usually Selectedindex will be -1 if nothing selected.and it will return value from 0 to n-1 if any of the item is selected.and also you can get the selected item directly using listbox1.selectedItem.mohanPosted May 9, 2009, 5:29 AM
mohanPosted May 9, 2009, 2:45 AM
Vimal KandasamyPosted May 9, 2009, 2:26 AM
{{{