Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to get column width in Table
I need to know real column widths in a table in order to save and reapply them.
The getColumnWidth method returns -1 for every width not setted by code.
The ColumnResizeEvent will inform code the size is changed providing also previous size but only for resized fields.
I didn't find any way to get that info for all columns in my table.
Could someone suggest a solution ?
Tks
Tullio
Guttorm Vik: table.addColumnResizeListener ?
With resizeListner I only get the width of modified columns non the width of others columns in which I didn't set explicitely the size.
Tks
The javadoc says:
- Adds a column resize listener to the Table. A column resize listener is called when a user resizes a columns width.
I've tested it. It works for me.
It worked also for me but it didn't solve my problem.
I need to know the size not only when the user resizes but in any situation.
Tks