Welcome to MSDN Blogs Sign in | Join | Help

jfo's coding

adventures in windows forms and wpf
How do I get keyboard access to my ToolStripButton?

I've gotten this question a couple times so I thought I'd share.  If you want to allow keyboard access to your ToolStripButton, there are several options for doing so.

Option A
Classically, a toolbar button should be a duplicate of whats on your menu.  If this is the case you don’t need it to be keyboard accessible.

Option B
Add a label with a mnemonic to get keyboard access into the toolbar.  This is what the IE does with A&ddress in their address bar. 
 
Option C
Add mnemonics for your toolbar buttons so they’ll get clicked when the mnemonic is pressed.

Option D
If you have a toolbar in a dialog, set TabStop = true so that the toolbar is tab-into-able. 

Posted: Wednesday, January 25, 2006 1:24 PM by jfoscoding
Filed under:

Comments

Anonymous said:

And the answer is...
?
# January 25, 2006 3:21 PM

jfoscoding said:

Well, they're really all OK, but A is the best.
# January 25, 2006 9:02 PM
New Comments to this post are disabled
Page view tracker