Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a UserControl with a DataGrid and a UserControl with a ListBox both running inside of the same form. The ListBox is loaded with a fixed number of items when the form is instantiated. The number of items in the grid periodically changes throughout the life of the form.

I use ListBox.IndexFromPont() in the MouseMove event of the ListBox to retrieve information about the objects in the ListBox items collection. It has worked quite well for some time. However, today the IndexFromPoint() method began returning indices starting at 19 (e.g item 1 = index 19, item 2 = index 20, item 3 = index 21, etc). The only kind of pattern or correlation I have been able to find is that when the number of items in the grid gets up around 50 or greater, this ListBox issue begins happening. If the grid only has a few items, this issue does not happen. Has anyone seen anything like this before!?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...