Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » How to make nattable fill window horizontally
How to make nattable fill window horizontally [message #1786879] Mon, 14 May 2018 17:38 Go to next message
PK Mising name is currently offline PK Mising nameFriend
Messages: 44
Registered: July 2009
Member
Hello,
I have nattable in a composite container. I am using gridlayout in the composite container. I am setting the griddata settings on the nattable and asking to use all available by setting grabExcessHorizontalSpace.

However, when the composite resizes the nattable does not fill the composite container horizontally. How can I make the nattable resize the columns proportionally, and fill the window at all times?

When the window size is below a minimum width, then I want o enable the scroll bars.

Can someone please give me a hint on how to accomplish this..

Thanks.
Re: How to make nattable fill window horizontally [message #1786892 is a reply to message #1786879] Tue, 15 May 2018 05:10 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
The NatTable control is of course filling the whole available space if you configured the layout data correctly. But if you do not provide a proper column width configuration, the column width is static and does not update on resizing the container.

If you want some sort of dynamic column width configuration, you need to enable this for example via
DataLayer#setColumnPercentageSizing(true)

You can even be more precise in setting the percentage values per column if you want. Have a look at the provided API in DataLayer or in percentage sizing related examples or forum posts.

The requested feature on a minimum width with percentage sizing is included in the current 1.6 development. If you want to use that, you need to stick with a SNAPSHOT build until I have finalized the work on 1.6. Doing this you can enable a minimum column width via
DataLayer#setDefaultMinColumnWidth(int)

or again even more precise per column via
DataLayer#setMinColumnWidth(int, int)
Re: How to make nattable fill window horizontally [message #1786915 is a reply to message #1786892] Tue, 15 May 2018 14:29 Go to previous messageGo to next message
PK Mising name is currently offline PK Mising nameFriend
Messages: 44
Registered: July 2009
Member
Thank you so much for the comprehensive answer.
Re: How to make nattable fill window horizontally [message #1786929 is a reply to message #1786915] Wed, 16 May 2018 01:42 Go to previous messageGo to next message
PK Mising name is currently offline PK Mising nameFriend
Messages: 44
Registered: July 2009
Member
Dirk,
The nattable builder code was missing the ability to add the blinklayer. How can I get the changes submitted to the project? If I wanted to become a contributor on the nattable, what do I need to do?

Thanks.
Re: How to make nattable fill window horizontally [message #1786933 is a reply to message #1786929] Wed, 16 May 2018 05:11 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
First, you are hijacking a thread with a different topic.
Second, you refer to a dead project. The NatTable builder was closed years ago. Nobody was working on it, therefore nobody kept it up to date with the current development, so for me NatTable builder does not exist anymore. We also do not publish it, so if you use it you are doomed when it comes to automated builds on a build server. That said, I recommend to not rely on the builder and I also will reject any contribution to that project. Actually I now think about even removing it from the repository. But probably not before 1.6.
Becoming a contributor is easy, create an Eclipse account and an account for Gerrit, create a ticket, push your changes to Gerrit for a review and wait for review comments and at the end the changes will be merged by me. We should have a contributor guide on our website that should help.
Becoming a committer means to provide good contributions for a while to prove that you know what you are doing and that you are familiar with our project rules.
Previous Topic:NatTable data refresh issue on Horizontal and Vertical Scroll
Next Topic:BUG: Excel like filter with same filter value
Goto Forum:
  


Current Time: Fri Apr 19 02:43:17 GMT 2024

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

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

Back to the top