C#按钮文本统一code字 [英] C# Button Text Unicode characters

查看:176
本文介绍了C#按钮文本统一code字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C#不希望把统一code字上的按钮。如果我把\\ u2129在按钮的Text属性的按钮显示\\ u2129,而不是统一code字符(例如 - 我选择了2129,因为我可以在字体的计算机上当前活动看出来)。

C# doesn't want to put Unicode characters on buttons. If I put \u2129 in the Text attribute of the button, the button displays the \u2129, not the Unicode character, (example - I chose 2129 because I could see it in the font currently active on the machine).

我以前看到这个问题,<一个href=\"http://stackoverflow.com/questions/255907/how-to-put-uni$c$c-characters-on-a-system-windows-forms-button-in-c\">link文字,但问题并没有真正回答,只是得到各地。我工作的这会在世界各地的应用程序,并且不希望安装所有的字体,更多的则不希望,就有多少,我怀疑我的工作机器有足够的磁盘空间。我们的海外销售代理商提供的Uni code字符数字。有另一种方式向前呢?

I saw this question before, link text, but the question isn't really answered, just got around. I am working on applications which are going all over the world, and don't want to install all the fonts, more then "don't want", there are that many that I doubt the machine I am working on has sufficient disk space. Our overseas sales agents supply the Unicode character "numbers". Is there another way forward with this?

顺便说一句,(好奇心),为什么它不工作?

As an aside, (curiosity), why does it not work?

推荐答案

的问题是:


  • C#的将会的让你把统一code中,如 button1.Text =你好\\ u2129; ,没问题

  • ,但在Visual Studio窗体设计器的不会的认识到'\\ u2129'作为什么特别。由设计。

  • C# will let you put Unicode in, like button1.Text = "Hello \u2129";, no problem
  • but the Visual Studio Forms designer will not recognize '\u2129' as anything special. By design.

因此​​,只要粘贴在属性窗口或使用code中的'℩。

So just paste in the '℩' in the Properties Window or use code.

这篇关于C#按钮文本统一code字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆