TableView icon indicating copy to clipboard operation
TableView copied to clipboard

Controlling table width

Open Md-Ala-Uddin opened this issue 4 years ago • 2 comments

How to implement the logic so that table width expand to cover whole device with when table width is smaller than the device width, also available space equally distributed to columns & if table width bigger than the device width it will function as usual i.e. scrollable.

Md-Ala-Uddin avatar Dec 13 '20 22:12 Md-Ala-Uddin

+1

mamomia avatar Feb 12 '21 09:02 mamomia

Unfortunately, there is nothing in TableView that automatically resolves this for now. The TableView only calculates the minimum value the column should be. So if there is an empty area, it does not say that I may use it.

There is a way to solve this but you have to do it.

By taking the incoming column widths via getColumnWidth(int columnPosition), you can compare with the width of the TableView, check whether the case you have mentioned occurs, you can assign a width to the corresponding columns yourself using setColumnWidth(int columnPosition, int width)

evrencoskun avatar Feb 12 '21 12:02 evrencoskun