单选按钮文本修改 [英] Radio Buttons Text Modification

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

问题描述


任何机构都可以解释一下,如果将单选组项目放置在布局控制项目上时,我们如何为其提供多行文本?

在此先感谢

Hi,
Could any body please explain how can we give multiline text for a radio group item when it is placed over a layout control item ?

Thanks in advance

推荐答案

成员8557048323,请告诉我们这是WinForms还是WPF:我们在这里不是通心粉(尽管有时我认为SAK和OriginalGriff是!):)

在WinForms中:我可以在设计时用 多行文本创建一个RadioButton,方法是:

1.将其AutoSize属性设置为" false

2.设置一个长字符串作为CheckBox的Text属性.注意:在我自己的实验"中,我发现在Text属性中包含换行符的转义字符在设计时不能添加行进,而是仅按键入时的样子进行渲染. >
3.调整RadioButton的大小以包装"文本,以使其看起来尽可能的好.

或者...

在运行时的代码 中,您实际上可以强制将AutoSize设置为"true"的RadioButton包含多行:例如:
Member 8557048323, please tell us whether this is WinForms, or WPF: we''re not psychics here (although sometimes I think SAK and OriginalGriff are !) :)

In WinForms: I can create a RadioButton with multi-line text at design-time by:

1. set its AutoSize property to ''false

2. set a long string of characters as the Text property of the CheckBox. Note: in my own "experiments," I found that including escaped characters for line-returns in the Text property will not work at design-time to add line-feeds, but will just be rendered exactly as you typed them.

3. resize the RadioButton to "wrap" the Text, to look as best as I can get it to look

Or ...

In code at run-time you can actually force a RadioButton with AutoSize set to ''true to include more than one line: for example:
radioButton1.Text = "some text" + Environment.NewLine + "more text" + Environment.NewLine;

是否是当AutoSize设置为"true"时,您可以这样做.

在设计时,将AutoSize设置为"false":您可以控制RadioButton边框的范围.

在运行时,我认为您在任何情况下都不希望更改RadioButton的大小.

Whether it is a good idea to do that, when AutoSize is set to ''true: well, you decide.

At design-time, with AutoSize set to ''false: you have control over the extent of the RadioButton''s bounding-box.

At run-time, I don''t think you''d want to go near changing the size of the RadioButton, under any circumstances.


这篇关于单选按钮文本修改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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