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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use ampersand in menu item text

Status
Not open for further replies.

rjoubert

Programmer
Oct 2, 2003
1,843
US
I'm working on a VB.NET 2005 windows application. My main container form (this is a MDI application) has a menu of options docked to the left side. One menu option that I am attempting to add needs to have an ampersand (&) in the text. Yet when I add the ampersand, it thinks I'm adding a shortcut key to the menu item and puts the underscore under the character immediately after the ampersand. Is there a way to have it display the ampersand and not interpret it as a need for a shortcut key? I've tried using an escape character, but that didn't work. I've also tried putting a space before and after the ampersand, but it just underscores the space.

If there is no way around this, is there a symbol I can use in place of the ampersand to mean "AND"? Thanks...
 
Please disregard my question. I just figured it out. I put two ampersands together in the text property of the link, and it now displays one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top