开发者

Disable conversion of & to shortcut indicator (winforms)

开发者 https://www.devze.com 2023-01-16 21:22 出处:网络
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\".

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 ca开发者_C百科se "C"

Disable conversion of & to shortcut indicator (winforms)

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

Thanks in advance.


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("&","&&") 
0

精彩评论

暂无评论...
验证码 换一张
取 消