C
Chris
Hi,
I am trying to implement some custom handling of the up/down arrow keys in a
parent UserControl with a collection of other Controls as children. The aim
being to move focus between the child controls vertically as well as
horizontally (horizontal navigation works fine out of the box)
I have spent hours trying various things in the debugger and viewing events
using "ControlInspector". I have reached the conclusion that these keys are
being handled somewhere "behind the scenes" in the "Message preprocessing"?
I can't find any articles on how this works or how to intercept these key
down events. Neither the parent control or the child controls see a Key Down
event and the Control.ProcessKeyPreview method in the parent does get the
Key Down message but after the default handling of the key has occurred!
I think the solution maybe something to do with the Control.IsInputKey() or
Control.ProcessKeyMessage() methods... am I on the right track?
Any help greatly appreciated.
tia
Chris
I am trying to implement some custom handling of the up/down arrow keys in a
parent UserControl with a collection of other Controls as children. The aim
being to move focus between the child controls vertically as well as
horizontally (horizontal navigation works fine out of the box)
I have spent hours trying various things in the debugger and viewing events
using "ControlInspector". I have reached the conclusion that these keys are
being handled somewhere "behind the scenes" in the "Message preprocessing"?
I can't find any articles on how this works or how to intercept these key
down events. Neither the parent control or the child controls see a Key Down
event and the Control.ProcessKeyPreview method in the parent does get the
Key Down message but after the default handling of the key has occurred!
I think the solution maybe something to do with the Control.IsInputKey() or
Control.ProcessKeyMessage() methods... am I on the right track?
Any help greatly appreciated.
tia
Chris