How do you get a list box tobe "unselected"?
Sorry if it's not the correct terminology!
What I am looking for is this:
Lets say you have a list box with 5 names. If you click in the box, it will highlight one of the names.
I want to be able to get rid of that highlight. Is it possible?
if you tell it to lose focus or dehighlight, you still have a line selected in there...
I'd like to "lose" that highlight... (so none of the lines are selected, but the listbox is still "active".)
Thanks in advance!
Re: How do you get a list box tobe "unselected"?
I think that it counts no line as selected if you set the "selected line" to -1.
Re: How do you get a list box tobe "unselected"?
Quote:
Originally Posted by DavidN
I think that it counts no line as selected if you set the "selected line" to -1.
*tries this*
Hmmmm. The line is still highlighted...
Thanks for your reply.
Re: How do you get a list box tobe "unselected"?
Set the "selected line" to 0 and optionally "lose focus" aswell.
Re: How do you get a list box tobe "unselected"?
It's -1 if the list is 0 based.
Re: How do you get a list box tobe "unselected"?
Quote:
Originally Posted by Jam
It's -1 if the list is 0 based.
THANKS! That did the trick! ;)
Re: How do you get a list box tobe "unselected"?
Ah, that's what it was - I was wondering why it didn't work for you! I'm in the habit of putting everything possible to 0-based.