A
Aaron Queenan
Is there any way to know whether the OnItemCheck is being called in response
to a user action (mouse or keyboard) as opposed to the form loading?
I have a class which derives from System.Windows.Forms.ListView. Among
other features, it enables the checkboxes and overrides the OnItemCheck()
method. I have placed this ListView on a form and use form.ShowDialog() to
display it whenever the user presses a certain button.
If the user ticks any of the items in the ListView, and then presses the
button again, the form displays okay, but it calls the OnItemCheck() method
twice for each item that was previously checked (once to uncheck, and again
to check the item).
The problem is, that I keep track of the order in which the user checked the
checkboxes, and when OnItemCheck is called it effectively changes the order
to be the same as the insertion order in the list.
Thanks,
Aaron Queenan.
to a user action (mouse or keyboard) as opposed to the form loading?
I have a class which derives from System.Windows.Forms.ListView. Among
other features, it enables the checkboxes and overrides the OnItemCheck()
method. I have placed this ListView on a form and use form.ShowDialog() to
display it whenever the user presses a certain button.
If the user ticks any of the items in the ListView, and then presses the
button again, the form displays okay, but it calls the OnItemCheck() method
twice for each item that was previously checked (once to uncheck, and again
to check the item).
The problem is, that I keep track of the order in which the user checked the
checkboxes, and when OnItemCheck is called it effectively changes the order
to be the same as the insertion order in the list.
Thanks,
Aaron Queenan.