How to wrap long radiobutton label in extjs

2019-07-29 09:45发布

问题:

My above radion button wraps the label, but it is not aligned properly. It should align right below the first text on the top. Is there a config I have to set inorder for the labels to wrap correctly.

回答1:

Im pretty sure there is no config to do this. Only reasonable way is by fiddling with CSS - How to align checkboxes and their labels consistently cross-browsers

+In current version (4.2.1.), there is a bug, which wraps whole label text under the radio (see here).



回答2:

By looking at what ExtJS 6 implemented. You can use this CSS overwrite on ExtJS 4.2.1:

.x-form-cb-label-after {
    display: inline-block;
    padding-left: 17px;
    margin: 4px 0 0 0;
}
.x-form-cb {
    margin-top: 5px;
    position: absolute;
}

And accomplish this: