Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Underlines and hotkeys 1

Status
Not open for further replies.

AdaHacker

Programmer
Sep 6, 2001
392
US
I'm trying to set up some hotkeys for command buttons on a form. I know that you can usually just put a "&" in the caption before the letter you want to use as the hotkey, and then when the user presses ALT+Hotkey, it will trigger that button.
This works very well, but I was under the impression that the character for the hotkey was supposed to be underlined in the caption. That doesn't seem to be working. I have an SSTab control with a bunch of command buttons on it. I defined some hotkeys for the various tabs, and they work perfectly, underlines and all. But with the command buttons, the appropriate hotkey will trigger the button, but there aren't any underlines. Why is that? Is there some property that I forgot to set? The keys aren't very useful if the user doesn't know about them, so how can I fix this?
 
Um... I guess I figured it out, at least sort of. Seems that the underlines are only showing up when I use a hotkey to get to a particular tab, and only if I don't hold down the ALT key between switching from one tab to another. Needless to say, this seems kind of dumb and isn't at all what I want. I'd like the underlines to be visible at all times, if that's possible. Any ideas?
 
This may seem weird, but I've had instances where the hotkey underlines on my menu failed to show up.
When I use the menu editor I see them, but when I run the app they're gone. Has anybody else seen this, or know what the cause is?
 
Depends on the OS you are using. With Win2k there is a checkbox on the display properties.. Effects tab for Hide keyboard shortcuts until Alt key pressed

Similar option may be in Win9x if you are using IE5+ ?

Chris
 
Chris,
Thanks for the help. We're using Win98 with IE 5.5, and I don't have any such checkbox in my display properies. However, TweakUI does have a setting for "menu underlines" in the effects box on the general tab. That seems to have done the trick. Thanks!
 
AnswerToPrayers,
Read the original post. That's exactly what I did, and it didn't work the way it should have. Hence this thread.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top