Special Characters in Label.Text

  • Thread starter Thread starter WAkthar
  • Start date Start date
W

WAkthar

Hi,

I have a string for example str = "abc&de"

When I try to put this string into a label, the & character disappears.
How can I stop this from happening?
What about for other special characters?


Cheers
 
Hi WAkthar,

You need to set the UseMnemonic property to false or &<character> will be translated to underscore and a short-cut key.
 
Other option and maybe more universal, as a button doesn't have the use
UseMnemonic property, is to put two & in the string.

for example str = "abc&&de"

--
Thanks
Wayne Sepega
Jacksonville, Fl

Enterprise Library Configuration Console Module Generator
http://workspaces.gotdotnet.com/elccmg

"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

Morten Wennevik said:
Hi WAkthar,

You need to set the UseMnemonic property to false or &<character> will be
translated to underscore and a short-cut key.
 
Back
Top