Skip to main content

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 RotenFriend
Messages: 5
Registered: December 2012
Location: Z├╝rich
Junior Member
I am having some issues/questions with specifying the column width for Nattables. Like the poster in this thread , 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 FauthFriend
Messages: 2772
Registered: July 2012
Senior Member

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.

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

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.

Previous Topic:Add checkboxes to the row column?
Next Topic:Making columns sortable
Goto Forum:

Current Time: Sun Jan 26 12:23:47 GMT 2020

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

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

Back to the top