i fixed but i still do not understend why the mouse wheel do not worked. The fix was adding a check
if (listView1.Item s[listBox1.Select edIndex].Selected) return;
so if the item is already selected i stop preventing the item to be reselected that will select again the item in my listbox. I placed break points and i do not found any circular calling betwen this controls, but something like that happend
User Profile
Collapse
-
my list box is ownerdraw so first i remove the code in the draw method, nothing. Surprise if i remove the code in the Seected index it works :
the code is:
this.listView1. Items[this.listBox1.S electedIndex].Selected = true;
this.listView1. Select();
i have the listbox and the listview and i syncronise them if you select a item in first the coresponding item is selected in second...Leave a comment:
-
listbox wont scroll with the mouse wheel
Hi, i need to use a owner draw listbox(i am using windows forms in NET 2.0 ). I created a testlistbox ,implemented the DrawItem method and it works fine, it scrolls with the mouse wheel. After that i created the same kind of listbox but i added more complex code in DrawItem and my listbox wont scroll with the mouse whell or with the arrows keys, i have to use the scrool bar. I search but i can't find the answer why in first case it works and in the...
No activity results to display
Show More
Leave a comment: