views:

22

answers:

1

I have a tab control (in my case a UltraTabControl from Infragistics) and I add a new tab.

The text of this new tab is set to "Escape &Characters".

lTab.Text = "Escape &Characters"

When visualizing the tab control the & will become an _ (underscore) for the next character - in this case "C" alt text

I know that & is the Microsoft way of indicating a shortcut character - but is there any way of disabling this behaviour?

Thanks in advance.

+1  A: 

I found the answer here.

If you want & in your menu/title name you have to pass it as &&, so right now I do:

inputText.Replace("&","&&") 
Ando
Jonathan
You are right - shorter is better (in this case). I modified the post to reflect your suggestion. Thanks
Ando