Toby Twerl
Newcomer
- Joined
- Apr 14, 2010
- Messages
- 3
I have designed a Composite UserControl that is similar to a ToolStrip but without all the Bells & Whistles and with the buttons behaving in the fashion of "RadioButtons"
The Parent Control inherits from a "ContainerControl" and the Button from a UserControl.
Everything works fine using the mouse for navigation and Button selection:
MouseUp
MouseDown
MouseEnter
MouseLeave
MouseMove
Etc
I am now trying to navigate by means of the Keyboard and have arrived at a complete mental block.
I have investigated "ProcessCmdKey" and "SelectNextControl" only to have my code evolving, more and more, into the proverbial spaghetti type.
So far all I have managed is to trap the "Enter" key (by way of code in the Button Control) but then only when the Button is first selected by the mouse.
All I need is to focus each button, in turn, backward and forward by means of the Left and Right ArrowKeys and, as a retired Machine Designer, to achieve this in an elegantly simple manner. This was quite simple in VB6 where we had Control Arrays.
I am only a recreational programmer who enjoys the challenge and, as I said retired, so there is no urgency to this problem - I'd just like to resolve it before the "Grim Reaper" comes a-knock'n.
Thanks,
Toby T.
The Parent Control inherits from a "ContainerControl" and the Button from a UserControl.
Everything works fine using the mouse for navigation and Button selection:
MouseUp
MouseDown
MouseEnter
MouseLeave
MouseMove
Etc
I am now trying to navigate by means of the Keyboard and have arrived at a complete mental block.
I have investigated "ProcessCmdKey" and "SelectNextControl" only to have my code evolving, more and more, into the proverbial spaghetti type.
So far all I have managed is to trap the "Enter" key (by way of code in the Button Control) but then only when the Button is first selected by the mouse.
All I need is to focus each button, in turn, backward and forward by means of the Left and Right ArrowKeys and, as a retired Machine Designer, to achieve this in an elegantly simple manner. This was quite simple in VB6 where we had Control Arrays.
I am only a recreational programmer who enjoys the challenge and, as I said retired, so there is no urgency to this problem - I'd just like to resolve it before the "Grim Reaper" comes a-knock'n.
Thanks,
Toby T.