Winform label control text changes place

拟墨画扇 提交于 2019-12-04 04:46:01

问题


I have a

labelControl.Text ="My name:";

Result is

:My name

Symbols changes place.

If I write "&= My name", the result is =& My name.

How do I stop it from changing places?


回答1:


You need to set the RightToLeft property correctly. By default this should be RightToLeft.Inherit. But either your Form or your Label was set like:

labelControl.RightToLeft = RightToLeft.Yes;

You need to set it to RightToLeft.No or RightToLeft.Inherit (if the parent control has it set to No).



来源:https://stackoverflow.com/questions/48866523/winform-label-control-text-changes-place

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!