Bjoern Berg Messages: 41 Registered: November 2009 Location: Essen
Member
Hi,
I am trying to use NatTable inside an RCP application in an editor. This works fine so far, but NatTable does not take the empty space or renders empty rows to fit the free space.
Is there an easy way to tell NatTable to render additional columns or expand the existing columns automatically to to fit free space?
With the normal SWT Table this is not a problem...
1. Use the NatGridLayerPainter which paints the grid lines in the remaining space. Unfortunately the column header isn't painted this way and therefore it looks strange IMHO. You can use it like this
NatGridLayerPainter layerPainter = new NatGridLayerPainter(natTable);
natTable.setLayerPainter(layerPainter);
2. Use the percentage sizing feature of the NatTable. You can configure your DataLayer to use percentage sizing, so the column sizes will be calculated taking the available space into account. You can use it like this
we really appreciate any help on such features. And of course you are right, it is not a bug, it's a feature. But as we are tracking every bug and enhancement in bugzilla now, it should be a bug entry there. You can categorize it as enhancement in the Importance section.
If you like, you can create a bug (enhancement) for this and contribute via patch. This way it is tracked for the release notes correctly.