Pushbutton & key accelerator not underlining?

Hi all,

I have a pushbutton on a window with the caption “&Test”
On windows only,
Now the accelerator works (can press alt+T and it pushes the button), but the underline of the letter does not show unless i press the alt key, once pressed, it shows the underline under the T.
Is this normal? Can I make it stay on by default to show my users what the key accelerators are?

Cheers
Andrew

Yes, this is the default in modern versions of Windows.

You can change it in the Control Panel:

  • Select Ease of Access Center control panel
  • Click “Make the keyboard easier to use”
  • Check the box for “Underline keyboard shortcuts and access keys”
  • Click Apply

You’ll probably have to restart the app for it to take effect.

Ok, Thanks for the info. Might be a bit hard to get users to do this. Might add the shortcut as a help tag or at the end of the caption (if it will fit).

Cheers.

Or use a BevelButton with a picture of the caption with the underline.

Thanks Michel,

Had a thought of that, but don’t think its worth the effort vs reward.

Cheers

Whatever. You are the one who wanted to add underline…

Yeah. I really wanted to know if I could override the default behaviour in windows. Force it on. The app is going to be mainly mac but I thought it would be nice to add it for windows if it were fairly simple. I guess if I went down the route of a bevel button I would have to write a class (or whatever it is called in xojo) to display the image if targetos is windows and not if mac. I might get to it one day, but for now, I don’t think its worth the extra time.
Thanks for your suggestions both here and in previous posts, you especially have helped me out a lot in the last few days. I really love the community here. It is a lot different to the VFP community (what’s left of it)!