May 11, 2024, 11:54:49 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


"&" Character in Menu Items

Started by Logman, July 02, 2009, 09:09:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Logman

I have a small issue in menu names. In the EBasic manual, it states that the "&" can be used in the item definitions to specify the letter to be underlined in the item text.

An example of using the "&" character is in the following code:


BEGINMENU win
     MENUTITLE "&File"
     MENUITEM "Open",0,1
     MENUITEM "Close",0,2
     BEGINPOPUP "Save As..."
          MENUITEM "Ascii",0,3
          MENUITEM "Binary",0,4
     ENDPOPUP
     SEPARATOR
     MENUITEM "&QUIT",0,5
     MENUTITLE "&Edit"
     MENUITEM "Cut",0,6
ENDMENU


The problem is that it doesn't actually make the underline appear when I compile and run the code. I remember that there was some kind of setting in XP and Vista that had to be set to make underlined characters appear, but I forgot how to do this--if that's my problem.

Any suggestions from someone who has working underlines in their code?

Thanks.

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

Logman

Flash of Insight:

Just hit me that the Windows XP setting is:

Control Panel > Appearance and Themes > Display > Appearance > Effects > then uncheck "Hide underlined letters for keyboard navigation..."

Also, it shows if you open the menu with the keyboard (Alt or F10).

Logman :-[
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

fasecero

When a menu is active, the user can select a menu item by pressing the key that corresponds to the item's underlined letter.
The same trick can be used with buttons in dialogs.