Mnemonic on buttons

Few questions about mnemonic property on buttons :

  • as far as i can see the mnemonic key will only work if the button has showClick enabled
    why is this ??

  • can only characters a-z and 0-9 be used ?
    no Ctrl or shift combinations ?

  • is there more information available, i searched the HELP but there is not much info.

Regards

mnemonics should also work in labels but then they trigger a focus gained on a text field where it is the label for property of.

So a mnemonic wont work on a label acting as a button no.

the char can be anything that is in the text of the label. Thats the whole point of a mnemonic. (see your menu bar like “File” where F is the mnemonic, its underlined)
then you can access it with ALT - ‘char’

Mnemonics are keyboard shortcuts for menu’s and other actions (button clicks or labels with the LabelFor property filled in)
and those short cuts are always ALT- ‘X’ (, Y , Z)

Hi,

Thanks for your answer !!

But, i place a button on a form with a mnemonic key.
This works (method is executed) both when selecting the button and when using the mnemonic.

Then i set the button property showClick to off and now
selecting the button still works, but the Mnemonic key does not work anymore.

Regards,

thats what i said
if you do onclick off then it is a label (that kind of works like a button because of some special event handling)
and for a label the mnemonic works different that a button

So it is correct behavior that we cant change because a label is “labelfor” not “doclick” for a mnemonic action/trigger.

Johan,

Do you have any alternative to this problem. I say problem, because it affects our look and feel of our motif. I have labels acting as tabs on a tab panel. I want to use mnemonics on the tabs to activate the forms to which they are associated. Obviously, if I turn onClick ON, then the whole look of the label changes to a button.

It ruins the look and feel of my app. Do you have plans to enable this functionality or maybe an alternative suggestion on how to handle this?

cheers!

You could try to add some buttons with the correct mnemonics that trigger the same methods then in onShow you hide the buttons, I know it’s not an elegant solution but it could work. And if an hidden button does not trigger the mnemonic you could try to simply put the buttons outside the form area.

what you also could try is to set the border of that button to nothing
that it looks like a label. but that is a bit depending on the lnf what it shows exactly.