开发者

Laying out radio buttons with additional label in dojox.layout.TableContainer

I have a problem laying out a number of rows each containing a label and two radio buttons with their own labels in a dojox.layout.TableContainer. When you use a normal label, it throws the layout out completely. As an alternative to using a label, I thought of using a dijit.form.TextBox, but this looks bad, so what I currently have is this (but it looks hideous b开发者_StackOverflow中文版ecause the text fields con):

            <div dojoType="dojox.layout.TableContainer" cols="3" customClass="labelsAndValues">
                <input dojoType="dijit.form.TextBox" readOnly value="Would you like to apply for residency?">
                <input type="radio" dojoType="dijit.form.RadioButton" name="residency"
                       value="No" title="No"/>
                <input type="radio" dojoType="dijit.form.RadioButton" name="residency"
                       value="Yes" title="Yes"/>
                <input dojoType="dijit.form.TextBox" disabled readOnly value="Are you currently residing overseas?">
                <input type="radio" dojoType="dijit.form.RadioButton" name="overseas"
                       value="No" title="No"/>
                <input type="radio" dojoType="dijit.form.RadioButton" name="overseas"
                       value="Yes" title="Yes"/>
            </div>

I guess it would be nice to have a dijit.form version of a label that plays together nicely with the TableContainer, but in the absence of that, what can I do?


Well, the solution I am using now is perhaps not the most elegant, but it plays together with the TableContainer, and that is to wrap the text for the long label in a dijit.layout.ContentPane.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜