Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsTable with variable row heights
https://www.eclipse.org/forums/index.php/mv/msg/154327/486103/#msg_486103
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 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]]>Ian Leslie2009-09-16T11:09:03-00:00SOLVED Re: Table with variable row heights
https://www.eclipse.org/forums/index.php/mv/msg/154327/486722/#msg_486722
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]]>Ian Leslie2009-09-18T18:53:12-00:00SOLVED Re: Table with variable row heights
https://www.eclipse.org/forums/index.php/mv/msg/154327/598222/#msg_598222
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.