Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » AutoSizing the Tree Columns(AutoSizing the Tree Columns)
AutoSizing the Tree Columns [message #529805] Tue, 27 April 2010 10:14 Go to next message
No real name is currently offline No real nameFriend
Messages: 11
Registered: March 2010
Junior Member

How to do autoresizing the each column in Tree component.
Re: AutoSizing the Tree Columns [message #529813 is a reply to message #529805] Tue, 27 April 2010 10:50 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 27.04.2010 12:14, atmohsin@gmail.com wrote:
>
> How to do autoresizing the each column in Tree component.

I do not have a particular solution for TreeColumns available,
but you might consider to adapt a variant of

http://eclipsenuggets.blogspot.com/2007/11/one-of-less-promi nent-novelties-in.html

to this problem.

HTH & Greetings from Bremen,

Daniel Krügler
Re: AutoSizing the Tree Columns [message #529829 is a reply to message #529813] Tue, 27 April 2010 11:53 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 11
Registered: March 2010
Junior Member

when i load the tree i need to set the width of the each column depending upon the data which is going to display , it should do autosize of each column.

How to implement autosize for the each column in tree component

Thanks
Mohsin
Re: AutoSizing the Tree Columns [message #530039 is a reply to message #529829] Wed, 28 April 2010 09:31 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 11
Registered: March 2010
Junior Member
Do you any one knows how to auto size the column in SWT Tree component,

Thanks
Mohsin
Re: AutoSizing the Tree Columns [message #530046 is a reply to message #530039] Wed, 28 April 2010 10:06 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 10
Registered: February 2010
Junior Member
Can you not keep the maximum width of items encountered so far for each column and keep updating it when you add new items?

When you are finished adding items to a particular column, use the command col.setWidth(maxWidthSoFar)

Re: AutoSizing the Tree Columns [message #530068 is a reply to message #530046] Wed, 28 April 2010 11:34 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 11
Registered: March 2010
Junior Member
Thanks

I want to resize the Tree once it is display, all the column should get resized depending the data it is displaying.
Re: AutoSizing the Tree Columns [message #531098 is a reply to message #530068] Mon, 03 May 2010 16:49 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
You can call TreeColumn.pack() at any time to have a column size itself to
fit its content.

Grant


<atmohsin@gmail.com> wrote in message news:hr96gl$nbf$1@build.eclipse.org...
> Thanks
>
> I want to resize the Tree once it is display, all the column should get
resized depending the data it is displaying.
Previous Topic:Is there something like treeitem.showCheckBox (boolean)
Next Topic:Running Swing or AWT widgets within SWT.
Goto Forum:
  


Current Time: Fri Mar 29 06:37:53 GMT 2024

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

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

Back to the top