Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Dynamic resizing of table columns(When main window size changes)
Dynamic resizing of table columns [message #1277928] Wed, 26 March 2014 16:58 Go to next message
Dominic Hanlan is currently offline Dominic HanlanFriend
Messages: 98
Registered: July 2009
Member
Hi,

I'm used to the ability to resize the column widths based on a percentage of the table width as a whole on the RCP platform. This allows the columns to resize if the main window is expanded or contracted using an event listener.

Is there any similar mechanism with Scout??

/Dominic
Re: Dynamic resizing of table columns [message #1278362 is a reply to message #1277928] Thu, 27 March 2014 08:22 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 187
Registered: August 2013
Senior Member
Hi Dominic,

maybe you are looking for the Table's

@Override
protected boolean getConfiguredAutoResizeColumns() {
 return true;
}



Btw, there was an error in the JavaDoc of getConfiguredAutoResizeColumns():
'Default is {@code true}' but should be 'Default is {@code false}' (https://git.eclipse.org/r/#/c/23964/)

Thanks Dominic for pointing this out Smile

Best regards,
Matthias

[Updated on: Thu, 27 March 2014 08:43]

Report message to a moderator

Re: Dynamic resizing of table columns [message #1278628 is a reply to message #1278362] Thu, 27 March 2014 16:05 Go to previous messageGo to next message
Dominic Hanlan is currently offline Dominic HanlanFriend
Messages: 98
Registered: July 2009
Member
Hi,

yes I saw that method, but that sets all table columns to the same width. I was wanting something where by I can have a set percentage per column, i.e.

<-10%-><-----50%-----><--20%--><--20%-->

Regards
Re: Dynamic resizing of table columns [message #1278644 is a reply to message #1278628] Thu, 27 March 2014 16:31 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 790
Registered: October 2011
Senior Member
Dominic Hanlan wrote on Thu, 27 March 2014 17:05

yes I saw that method, but that sets all table columns to the same width.


I don't think so. The proportions indicated in each column (getConfiguredWidth) are preserved.

Your example should work if use (for example):
- 1. column getConfiguredWidth => 50
- 2. column getConfiguredWidth => 250
- 3. column getConfiguredWidth => 100
- 4. column getConfiguredWidth => 100

And on the table: getConfiguredAutoResizeColumns => true


.

[Updated on: Thu, 27 March 2014 16:34]

Report message to a moderator

Previous Topic:Show PDF file on client
Next Topic:How to get data out of formdata by fieldName
Goto Forum:
  


Current Time: Sun Nov 23 21:35:27 GMT 2014

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

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