I have a ListBox with a few items and at sometimes, when the ListBox only has a couple of items, you'll see a blank area after the last item because there are no more items to fill the ListBox.
Now, I've implemented the MouseDoubleClick event to get the index of the double-clicked item in the ListBox like this:
private void listNotes_MouseDoubleClick(object sender, MouseEventArgs e) {
int noteIndex = listNotes.IndexFromPoint(e.Location);
// DO SOMETHING ELSE...
}
However, if I double-click on that blank area, noteIndex will have the index value of the last item on the list.
Not having a backup on Earth and another on the moon and another on Mars is also a redundancy failure.
Not having a backup in another galaxy is a redundancy failure
How do people work?
You have 1 PC, 1 Laptop and 1 iPhone.
How do you synchronize your photos, videos and documents between 3 different devices? Of course, it's with the cloud, right?
Are you going to use an external SSD to share files between your PC, Laptop and iPhone?
"New" Outlook is not even a mobile app (mobile app has Unified Inbox at least), this is just their web app with an added ability to use email account other than Microsoft's.
Question
ProclaimDragon
Hi there,
I have a ListBox with a few items and at sometimes, when the ListBox only has a couple of items, you'll see a blank area after the last item because there are no more items to fill the ListBox.
Now, I've implemented the MouseDoubleClick event to get the index of the double-clicked item in the ListBox like this:
However, if I double-click on that blank area, noteIndex will have the index value of the last item on the list.
I need to ignore this behavior. Any suggestions?
Link to comment
https://www.neowin.net/forum/topic/669318-c-problem-with-double-click-on-listbox-item/Share on other sites
21 answers to this question
Recommended Posts