Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » set Column width
set Column width [message #659578] Mon, 14 March 2011 12:12 Go to next message
ash is currently offline ash
Messages: 142
Registered: July 2010
Senior Member
Hi,

How set table viewer column width to fit the
data width.

Example :

Data is 20 pixel
Column width 10 pixel

Now table column width should automatically resize to 20 pixel automatically based on data width ..

Thanks
Ashok
Re: set Column width [message #659675 is a reply to message #659578] Tue, 15 March 2011 04:28 Go to previous messageGo to next message
Wim Jongman is currently offline Wim Jongman
Messages: 275
Registered: July 2009
Senior Member

Hi,

Sounds like a nice feature but as far as I know it does not exist. I think
you will have to add your own listener to achieve this. Try the SWT
newsgroup.


http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/org.ecli pse.swt.snippets/src/org/eclipse/swt/snippets/Snippet77.java

Regards,

Wim

> Hi,
>
> How set table viewer column width to fit the
> data width.
>
> Example :
>
> Data is 20 pixel
> Column width 10 pixel
>
> Now table column width should automatically resize to 20 pixel
automatically based on data width ..
>
> Thanks
> Ashok
Re: set Column width [message #660054 is a reply to message #659578] Wed, 16 March 2011 13:14 Go to previous messageGo to next message
Lakshmi Shanmugam
Messages: 274
Registered: July 2009
Location: India
Senior Member
Hi,

The TableColumn doesn't resize automatically. But you can call TableColumn.pack() when you want to resize the column width to the item's width.


Lakshmi P Shanmugam
Re: set Column width [message #663189 is a reply to message #660054] Mon, 04 April 2011 05:26 Go to previous messageGo to next message
ash is currently offline ash
Messages: 142
Registered: July 2010
Senior Member
Hi,

Does TableColumn.pack() work on Solaries ?


Thanks
Ashok
Re: set Column width [message #664784 is a reply to message #663189] Mon, 11 April 2011 21:26 Go to previous message
ash is currently offline ash
Messages: 142
Registered: July 2010
Senior Member
Can any one help me on this .....
Previous Topic:instance of same View placing
Next Topic:change the behaviour of the properties view.
Goto Forum:
  


Current Time: Wed Jul 30 13:25:32 EDT 2014

Powered by FUDForum. Page generated in 0.07902 seconds