Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...