Search code examples
codenameonelwuit

Fit table to screen - codenameone


I use table In one of my codenameone application forms.

I've a problem on column width. In some devices the table shows with horizontal scroll but in some devices not. I wanna fit the table to device screen width or change some columns width. I was searching for this feature but I didn't find something proper.

How can it perform?


Solution

  • You can use the width attribute, it is expressed in percentage of available space where -1 is a special case (use it only on one column) that takes up remaining available space.