Share via


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.

Comments

  • Anonymous
    January 25, 2006
    And the answer is...
    ?
  • Anonymous
    January 25, 2006
    Well, they're really all OK, but A is the best.