label - Vaadin layout break line without panel -
i know possible labels automatically break lines when in panel. there way have labels break lines when text on layouts width?
update ok tried "800px" width instead of "100%" , labels having line breaks. whats reason behaviour? , how can workaround percentual sizing of layouts important page?
it looks in image below, text cut off.
extracted code showing setup:
verticallayout labellayout= new verticallayout(); labellayout.setwidth("100%"); labellayout.addcomponent(usernamelabel); labellayout.addcomponent(postlabel); labellayout.addcomponent(ratiolabel); labellayout.addcomponent(lowestratedpost); labellayout.addcomponent(highestratedpost); detailslayer.addcomponent(labellayout); wrappercontent.addcomponent(detailslayer); wrapper.addcomponent(wrappercontent);
i had problem, , managed solve using css. vaadin labels have css attribure white-space: nowrap stoping text wrapping expect to.
.v-label { white-space: normal; }
Comments
Post a Comment