Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT multiline table with rows of different sizes
SWT multiline table with rows of different sizes [message #897234] Mon, 23 July 2012 10:20 Go to next message
Lluis Barbal is currently offline Lluis BarbalFriend
Messages: 4
Registered: July 2012
Junior Member
Hi all,

I have used one of the multiline samples in the web to create a SWT multiline table. I use a TableViewer with a label provider subclassed from OwnerDrawLabelProvider.

Everything worked ok until I have tried to have cells of different heights as the table have problems in painting and selection.

I have been googling for a while and I have found a post back in 2005 where it was said that this feature was not supported.

Could anyone tell me if it is currently supported?

Thanks in advance

Lluís
Re: SWT multiline table with rows of different sizes [message #897249 is a reply to message #897234] Mon, 23 July 2012 12:02 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi Lluis,

have you looked at the Snippet006TableMultiLineCells JFace snippet? It has row's height based on the text content.
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet006TableMultiLineCells.java?view=markup
Re: SWT multiline table with rows of different sizes [message #897255 is a reply to message #897234] Mon, 23 July 2012 12:28 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
This restriction still applies - you need to use a custom drawn control
like Nebula-Grid or NatTable.

Tom

Am 23.07.12 12:20, schrieb Lluis Barbal:
> Hi all,
>
> I have used one of the multiline samples in the web to create a SWT
> multiline table. I use a TableViewer with a label provider subclassed
> from OwnerDrawLabelProvider.
>
> Everything worked ok until I have tried to have cells of different
> heights as the table have problems in painting and selection.
>
> I have been googling for a while and I have found a post back in 2005
> where it was said that this feature was not supported.
>
> Could anyone tell me if it is currently supported?
>
> Thanks in advance
>
> Lluís
>
Re: SWT multiline table with rows of different sizes [message #897258 is a reply to message #897255] Mon, 23 July 2012 12:39 Go to previous messageGo to next message
Lluis Barbal is currently offline Lluis BarbalFriend
Messages: 4
Registered: July 2012
Junior Member
Hi all,

First of all, thank you all for your fast replies; is nice to have people trying to help you when you have a problem.

Ok. I will have a look at them.

Lluís
Re: SWT multiline table with rows of different sizes [message #897311 is a reply to message #897258] Mon, 23 July 2012 14:46 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Well, I thought you would like to have each row of different height.

In case you would like to have each single cell different height, it's impossible as Thomas said.
Re: SWT multiline table with rows of different sizes [message #897444 is a reply to message #897311] Tue, 24 July 2012 07:43 Go to previous messageGo to next message
Lluis Barbal is currently offline Lluis BarbalFriend
Messages: 4
Registered: July 2012
Junior Member
Hi Jan,

Ooooops, my mistake. YOU ARE RIGHT, I meant rows, not cells.

Anyway, the sample I used was similar to the one that you are pointing and it didn't work with different ROW heights. Are you sure different ROW heights are supported?

By the way, is it possible to use add editing cappabilities to the cells?

Thanks and sorry for the misunderstanding.

Lluís
Re: SWT multiline table with rows of different sizes [message #897473 is a reply to message #897444] Tue, 24 July 2012 08:48 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
No SWT-Tables in SWT-Tables all rows have to have the sameheight.

Tom

Am 24.07.12 09:43, schrieb Lluis Barbal:
> Hi Jan,
>
> Ooooops, my mistake. YOU ARE RIGHT, I meant rows, not cells.
>
> Anyway, the sample I used was similar to the one that you are pointing
> and it didn't work with different ROW heights. Are you sure different
> ROW heights are supported?
>
> By the way, is it possible to use add editing cappabilities to the cells?
>
> Thanks and sorry for the misunderstanding.
>
> Lluís
Re: SWT multiline table with rows of different sizes [message #897481 is a reply to message #897473] Tue, 24 July 2012 09:14 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Oh, I can see it now. All the rows have really the same height.

They are first low, but when you start scrolling down, they ALL suddenly get bigger. That confused me.

So I have to apologize to you for giving you a false hope, Tom is right.
Re: SWT multiline table with rows of different sizes [message #899021 is a reply to message #897481] Mon, 30 July 2012 08:11 Go to previous message
Lluis Barbal is currently offline Lluis BarbalFriend
Messages: 4
Registered: July 2012
Junior Member
Jan, Thomas,

Thanks for your comments. I will have a look at Nebula-Grid or NatTable.

Lluís
Previous Topic:drag & drop: source and target are the same
Next Topic:Java<-->JavaScript - window.external
Goto Forum:
  


Current Time: Wed Apr 24 15:29:37 GMT 2024

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

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

Back to the top