menus

BlitzPlus Forums/BlitzPlus Programming/menus

SDF_of_BC(Posted 2003) [#1]
in some code around here I see,
blah=createmenu("&file",blah....
OK ...
I was wondering what the '&' is for?
:)


Kev(Posted 2003) [#2]
& defines a keyboard short cut.

kev


cyberseth(Posted 2003) [#3]
It underlines the letter of the menu item (except on XP where underlines only appear if you hold down the Alt key). To open up the menu without clicking on it, hold down Alt and press the key of the underlined letter.


Snarty(Posted 2003) [#4]
To expand, look at the "File" menu heading in your browser, it has a "_" (XP hold Alt) under the F, hence this would be "&File", to underline the "i" would be "F&ile".

Use Alt+F, you'll see how it works. :) Then you also add to menu items in the same manner, such as "New" would be "&New", so Alt+F,N,W would open a new browser window. But then, so does Ctrl+N.