Check box control event events
Posted on 2004-12-01
Hell .net experts,
I am having some trouble with handling events in little app I'm developing. I've not used .net before so this is all new to me.
I have a form with a ViewTree in which the user can select various nodes. As the user browses through the nodes, details about the currently selected node are displayed on the form. One of the values these nodes have is a boolean that I represent as a CheckBox. The user is allowed to change this value by checking or unchecking the box which then changes the underlying value in the node object.
The event I'm using to handle this is CheckChanged, and it works ok if I just check and uncheck on a single node. My problem is that the CheckChanged event is also triggered when a user selects a node which has a different check status than the previous. In this case I dont want anything to happen, I understand why it's being triggered because, of course, the check box value has changed. But it has been changed because we are now looking at a different node, not because the user is trying to change the current node's status.
Anyone got any ideas on how to get around this? Are there other more appropriate events I could use?
Thanks for any input.