M
Matthew
C# Component Shortcut Key Event Focus
We have created our own checkbox component. By capturing the KeyDown and
KeyUp events the checkbox steps through a string containing a list of the
valid checkbox values, for instance: ABC etc. Also a blank space can be a
valid value.
Problem:
If there is a button on the form with the same shortcut key ('X') as one of
the valid values in our checkbox, the buttons OnClick event is captured
although our checkbox component has focus and also captures the keyboard
events. We have tried to set e.Handled = True in the KeyDown event, but this
does not correct the error.
Qestion:
How can we prevent other components on our form capturing keyboard events
when our own checkbox component has focus?
Thank you in advance... // Matthew
We have created our own checkbox component. By capturing the KeyDown and
KeyUp events the checkbox steps through a string containing a list of the
valid checkbox values, for instance: ABC etc. Also a blank space can be a
valid value.
Problem:
If there is a button on the form with the same shortcut key ('X') as one of
the valid values in our checkbox, the buttons OnClick event is captured
although our checkbox component has focus and also captures the keyboard
events. We have tried to set e.Handled = True in the KeyDown event, but this
does not correct the error.
Qestion:
How can we prevent other components on our form capturing keyboard events
when our own checkbox component has focus?
Thank you in advance... // Matthew