Being Pedantic - Do your buttons have a mnemonic?

Loading last updated info...

<introEmbed
  body={<>
A mnemonic for a button is the letter which has an underscore, and the user can press the button using `Alt-<char>`.
  </>}
/>

<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={ {
    preset: "badExample",
    figure: "Bad example - All buttons without Mnemonic",
    shouldDisplay: true
  } }
  src="/uploads/rules/being-pedantic-do-your-buttons-have-a-mnemonic/BadMem.gif"
/>


<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={ {
    preset: "goodExample",
    figure: "Good example - All buttons with Mnemonic - user can easily choose which button they want without a click",
    shouldDisplay: true
  } }
  src="/uploads/rules/being-pedantic-do-your-buttons-have-a-mnemonic/GoodMem.gif"
/>


In Windows Applications, it is quite easy to assign a mnemonic to a button with the "&" character.

So for the case above, the text would be:

```cs
btnAbout.Text = "&About"
```


<asideEmbed
  variant="info"
  body={<>
    Learn more about the [Mnemonic property on Windows Desktop](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.label.usemnemonic?view=windowsdesktop-7.0&WT.mc_id=WDIT-MVP-33518).
  </>}
  figureEmbed={{
    preset: "default",
    figure: "XXX",
    shouldDisplay: false
  }}
/>

Authors

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.

We open source.Loving SSW Rules? Star us on GitHub. Star