all groups > dotnet windows forms > june 2004 >
You're in the

dotnet windows forms

group:

ListBox


ListBox Jake
6/30/2004 7:17:01 PM
dotnet windows forms:
I've got a ListBox control with SelectionMode = MultiExtended. How do I unselect all items within the code? The top item is highlighted on screen load, and I don't want it highlighted.

Your help is appreciated,
RE: ListBox Jakob Christensen
7/1/2004 12:42:01 AM
Just set the ListBox.SelectedIndex property to -1.

Regards, Jakob.

[quoted text, click to view]
RE: ListBox Jake
7/1/2004 6:46:01 AM
I tried that first. It turns out I have to call that statement twice in a row.

I'm not sure why. Thank you.

Todd


[quoted text, click to view]
AddThis Social Bookmark Button