We have a contol that contains a couple of labels, a couple of buttons and three of text boxes. This control is inserted into a larger control which in turn is inserted into a larger control. (think of it as controls nested 3 deep).
The outer most control has several buttons on it. These buttons on the outer most control have accellerators keys enabled.
Here's the strange part. If I click on the background of the inner most control no control appears to have focus. However if I type one of the letter keys that is set for the accellorator key in the outer most control, the system executes the event handler attached to the button on the outer most control. I do NOT type ctl-s I only type 's'.
I can not figure out how the event is getting to the outer control. The key strokes are not the right ones.
I've tried adding a keyDown event handler for the inner control. I can see it being received. It is the proper letter/character. The control member of the keyEventArg is false. This is all what I expect.
Then I let the code go (in the debugger) and it hits the event handler for the button on the outer most control. The event args are empty. The sender is a button control. (the one I did NOT click).
Has anyone got any idea what would be causing this type of behavour?
This is .Net 2.0.
thanks
The outer most control has several buttons on it. These buttons on the outer most control have accellerators keys enabled.
Here's the strange part. If I click on the background of the inner most control no control appears to have focus. However if I type one of the letter keys that is set for the accellorator key in the outer most control, the system executes the event handler attached to the button on the outer most control. I do NOT type ctl-s I only type 's'.
I can not figure out how the event is getting to the outer control. The key strokes are not the right ones.
I've tried adding a keyDown event handler for the inner control. I can see it being received. It is the proper letter/character. The control member of the keyEventArg is false. This is all what I expect.
Then I let the code go (in the debugger) and it hits the event handler for the button on the outer most control. The event args are empty. The sender is a button control. (the one I did NOT click).
Has anyone got any idea what would be causing this type of behavour?
This is .Net 2.0.
thanks