shortcut letter for button

elmonkfish
05-04-2010, 09:48 AM
How do you underline a letter of a button caption so that it is the shortcut letter for that button?
In other programming languages you would use the ampersand in front of the letter you wanted to be the shortcut letter e.g. I have a button captioned Fred; the shortcut key is r so I would type as the caption F&red; the caption would appear as Fred.
If I type F&red as the caption that is what is displayed as the caption.
I am aware that you can type a letter for the accelerator property of a button which gives the expected behaviour of a shortcut letter, but I also want the visual effect of underlining the shortcut letter.

Bob Phillips
05-04-2010, 12:25 PM
What sort of button? If you mean a comandbar button, that is indeed an ampersand.

elmonkfish
05-05-2010, 12:20 AM
Sorry, I should have said - it is a commandbutton on a form

Bob Phillips
05-05-2010, 02:24 AM
Ah, OK. On a userform for a button, there is a property called ACcelerator. Set that to the letter that you want as your shortcut (accelerator) key.

elmonkfish
05-05-2010, 04:38 AM
Hi Bob, I am aware of accelerator property (as I mentioned in original post), but I wanted to achieve the visual effect of underlining the letter, else how would the user know what the accelerator key is?
Cheers

Bob Phillips
05-05-2010, 12:29 PM
That is what the accelerator key does (as well as making it a shortcut).

elmonkfish
05-06-2010, 12:17 AM
Very strange - it appears not to do that for me - thanks for your help anyway

Bob Phillips
05-06-2010, 04:59 AM
This is my system

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum