开发者

Is it possible to set column width in Percentage in Vaadin?

Is it possible to set a columnwidth of the Table in vaadin in percentage.If is it possible tell me how to do it with example code sn开发者_如何转开发ippet.Thanks in advance.


Yes. Use Table.setColumnExpandRatio(columnId, ratio) for that.

Let's say that you got the properties "foo", "bar" and "baz" in your table. If you do this:

table.setColumnExpandRatio("foo",1);
table.setColumnExpandRatio("bar",2);
table.setColumnExpandRatio("baz",1);

you'll get 25% to foo and baz and 50% to bar

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜