复选框文本换行符 [英] check box text line break

查看:126
本文介绍了复选框文本换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题在这里



http://postimg.org/image/os2xryot5/ [ ^ ]



The issue is here

http://postimg.org/image/os2xryot5/[^]

<td  id="tdchkboxIsDependant"  runat="server" style="width" >  
                      <dx:ASPxCheckBox  runat="server" ID="dxchkIsDependentField1" ClientInstanceName="dxchkIsDependentField1"  Text="Dependant Field"

                        ClientEnabled="true">
                        <ClientSideEvents CheckedChanged="function(s,e){if(s.GetChecked()){dxcbdependentfield.SetEnabled(true); DisableLink('true');} else{dxcbdependentfield.SetSelectedIndex(-1); dxcbdependentfield.SetEnabled(false); dxgvWellFields.PerformCallback(); DisableLink('false');}}" />
                      </dx:ASPxCheckBox>
                       <%-- <asp:Label ID="lblfordependantfield" runat="server" Text="Dependent Field"></asp:Label>--%>
                   </td>













if (wellFieldEntityTypeMapping.IsCalculatedField)
            {
                dxchkIsDependentField1.ClientEnabled = false;
                tdchkboxIsDependant.Attributes["style"] = "padding-top:15px;";
                dxchkIsDependentField1.CssClass = "smallItlicStyle";
                dxchkIsDependentField1.Text = "Calculated field cannot be " + "<br/>" + " marked as dependant field";
            }





我想打破复选框文本行。



I want to break the line of text of check box.

推荐答案

尝试 Environment.NewLine



Try Environment.NewLine

dxchkIsDependentField1.Text = 
    "Calculated field cannot be " + 
    Environment.NewLine + 
    " marked as dependant field";







干杯,

Edo




Cheers,
Edo


最好将宽度设置为复选框控件。它会自动降至第二行
It's better to set a width to a checkbox control.It's automatically down to second line
<dx:aspxcheckbox xmlns:dx="#unknown"> style="width:40px;"  runat="server" ID="dxchkIsDependentField1" ClientInstanceName="dxchkIsDependentField1"  Text="Dependant Field"/></dx:aspxcheckbox>



希望这会有所帮助


Hope this helps


这篇关于复选框文本换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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