Skip to main content



      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 06:14 Go to next message
Eclipse UserFriend

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 06:50 Go to previous messageGo to next message
Eclipse UserFriend
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 07:53 Go to previous messageGo to next message
Eclipse UserFriend

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 05:31 Go to previous messageGo to next message
Eclipse UserFriend
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 06:06 Go to previous messageGo to next message
Eclipse UserFriend
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 07:34 Go to previous messageGo to next message
Eclipse UserFriend
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 12:49 Go to previous message
Eclipse UserFriend
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: Sun Aug 31 04:13:17 EDT 2025

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

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

Back to the top