ListBox Strange Behaviour

Cricket

Active member
Joined
Jan 6, 2005
Messages
28
Location
Hamilton, ON, Canada
Programming Experience
5-10
I'm curious to know if anyone else has had problems with ListBoxes?

I've set the DataSource of a bunch of ListBoxes to their respective DataTables. When I change the Position in the CurrencyManager it then calls the ClearSelected() method and loops through the ListItems to reselect the appropriate Items.

This all works... mostly... However it often highlights the first row in the ListBox for no reason at all. I've looped through the code and that Row's Selected property is False, however it still shows as highlighted.

Also when I click on an Item within the ListBox it does all the appropriate events and methods but then highlights the first row or another row. I've followed the code and it seems to be entirely outside of anything I'm doing.

So if anyone has seen strange behaviour with ListBoxes please tell me how they ended up handling them. Otherwise I'm going to start losing hair.
 
Back
Top