Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Column width and column resizing
Column width and column resizing [message #991346] Tue, 18 December 2012 15:38 Go to next message
Geraldine von Roten
Messages: 5
Registered: December 2012
Location: Zürich
Junior Member
Hi,
I am having some issues/questions with specifying the column width for Nattables. Like the poster in this thread http://www.eclipse.org/forums/index.php/t/440363/ , my Nattable does not use up extra space, which does make sense, when all column have a fixed width. To avoid this I defined the width of the columns in percents instead. (Which was also one of the solutions given in the thread I mentioned). Unfortunately the same not-using-all-the-space behavior still occurs, if one of the columns is resized (to a smaller size) by the user.
I am not sure if this is a bug having something to do with the ColumnResizeCommandHandler calling "setColumnWidthByPosition" on the dataLayer instead of "setColumnWidthPercentageByPosition" or if this is the intended behavior.
Could somebody help me with this?
Related to this I was also wondering if there is a way of using fixed-width configuration and percentage configuration at the same time. I have the impression is doesn't work, but on the other hand I suppose it is pretty common to having one column that should be constant in size (e.g. a column with an icon) and having the others defined as percentages.
Thanks for your help Smile
Re: Column width and column resizing [message #991441 is a reply to message #991346] Wed, 19 December 2012 07:52 Go to previous message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1300
Registered: July 2012
Senior Member
Hi,

yes it is related to ColumnResizeCommandHandler calling "setColumnWidthByPosition". As far as I remember the value will be translated to the percentage value if a user resizes the column, but the other columns are not recalculated then. So it's worth a discussion whether this is a feature or a bug, but in fact it is something NatTable should take care of. I created an enhancement bug for this.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=396895

The other question is about mixing fixed-width and percentage sizing. This is currently not supported. I created an enhancement bug for this too.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=396896

Feel free to watch them or give comments on a possible solution.

As I implemented the percentage sizing for the current version, I will try to have a look at this soon. Unfortunately I don't have a solution for your cases until then.

Greez,
Dirk
Previous Topic:Scroll problem
Next Topic:Making columns sortable
Goto Forum:
  


Current Time: Tue Sep 30 20:13:16 GMT 2014

Powered by FUDForum. Page generated in 0.03107 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software