Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Table with variable row heights
Table with variable row heights [message #486103] Wed, 16 September 2009 11:09 Go to next message
Ian Leslie is currently offline Ian LeslieFriend
Messages: 137
Registered: July 2009
Senior Member
I'm a Nebula newbie but found CompositeTable yesterday and it looked
promising for what I wanted; a simple table where one column contains long
strings that wrap based on the column width and each row grows to the
height needed for that row's content.

I just ran through the snippets and did not see an example that is simiar
(I looked at Grid as well). Searching the forum I found
http://dev.eclipse.org/newslists/news.eclipse.technology.neb ula/msg00213.html
which indicates that rows must be of a fixed size. Is that still true?

I based my experiment on CompositeTableSnippet5.java because I want
resizable and sortable columns as well. But each row remained a fixed
size even after I regigged the Labels to have SWT.WRAP.

It seems that if I instead create my own custom row with its own layout I
will have more luck. Then I can make the columns resizable and sortable
myself in a similar way that AbstractSelectableRow and
AbstractNativeHeader work together to create resizable columns.

Does this seem at all reasonable? Am I pointed in the right direction?
Will rows with their own layout have variable height?

Thanks for your advice,

Ian
icon14.gif  SOLVED Re: Table with variable row heights [message #486722 is a reply to message #486103] Fri, 18 September 2009 18:53 Go to previous messageGo to next message
Ian Leslie is currently offline Ian LeslieFriend
Messages: 137
Registered: July 2009
Senior Member
With CompositeTable I think a custom composite row that included a multi-line text area would work but the column resizing to create a table like look would be a lot of additional work.

I looked at Grid again (initially it looked like it had too many bells and whistles - which it does for my needs :-) but it does have the ability to support variable height rows. Each column (GridColumn) can have word wrap turned on - gridWithLongTextColumn.setWordWrap(true);. Then you can pack each row (GridItem) in the Grid so that each row has the correct height. And all is good.

This seems to be the way to go for me.

Now all I have to do is tweak my data and label providers and figure out the right way to hook into sorting and I'll be happy.

Ian
SOLVED Re: Table with variable row heights [message #598222 is a reply to message #486103] Fri, 18 September 2009 18:53 Go to previous message
Ian Leslie is currently offline Ian LeslieFriend
Messages: 137
Registered: July 2009
Senior Member
With CompositeTable I think a custom composite row that included a multi-line text area would work but the column resizing to create a table like look would be a lot of additional work.

I looked at Grid again (initially it looked like it had too many bells and whistles - which it does for my needs :-) but it does have the ability to support variable height rows. Each column (GridColumn) can have word wrap turned on - gridWithLongTextColumn.setWordWrap(true);. Then you can pack each row (GridItem) in the Grid so that each row has the correct height. And all is good.

This seems to be the way to go for me.

Now all I have to do is tweak my data and label providers and figure out the right way to hook into sorting and I'll be happy.

Ian
Previous Topic:Gantt: Tree&Gantt Synhronization Problem
Next Topic:Gantt: Tree&Gantt Synhronization Problem
Goto Forum:
  


Current Time: Tue Mar 19 03:21:09 GMT 2024

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

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

Back to the top