Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Table with different sized rows and wrapped text
SWT Table with different sized rows and wrapped text [message #507879] Thu, 14 January 2010 19:08 Go to next message
Bill Masek is currently offline Bill MasekFriend
Messages: 8
Registered: July 2009
Junior Member
Hi,

I am trying to create a table that can have long and short lines as well
as different numbers of lines in each row.

I have the MeasureItem, EraseItem and PaintItem snippet, but even when I
report the correct size for each entry all of the entries are same height.

1. How do I create a table with rows having different heights?
2. Is there an easy way to wrap the text in a row or do I have to build
my own paint module for each item?

Thanks,
Bill Masek
billmasek@comcast.net
Re: SWT Table with different sized rows and wrapped text [message #507922 is a reply to message #507879] Fri, 15 January 2010 03:30 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 15.01.2010 01:05, Bill Masek wrote:
> I am trying to create a table that can have long and short lines as well
> as different numbers of lines in each row.
>
> I have the MeasureItem, EraseItem and PaintItem snippet, but even when I
> report the correct size for each entry all of the entries are same height.
>
> 1. How do I create a table with rows having different heights?

Not with SWT, which is affected by corresponding native limitations.

> 2. Is there an easy way to wrap the text in a row or do I have to build
> my own paint module for each item?

Have a look at

http://wiki.eclipse.org/index.php/JFaceSnippets#Snippet006Ta bleMultiLineCells

Hint: It's a good idea to first check

http://wiki.eclipse.org/index.php/JFaceSnippets

which usually provides examples of interesting use cases.

HTH & Greetings from Bremen,

Daniel Krügler
Re: SWT Table with different sized rows and wrapped text [message #508017 is a reply to message #507922] Fri, 15 January 2010 10:08 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
The relevant swt bug reports are:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=96624
https://bugs.eclipse.org/bugs/show_bug.cgi?id=154341

Grant


"Daniel Kr
Re: SWT Table with different sized rows and wrapped text [message #508094 is a reply to message #507922] Fri, 15 January 2010 16:32 Go to previous messageGo to next message
Bill Masek is currently offline Bill MasekFriend
Messages: 8
Registered: July 2009
Junior Member
Thank you for responding.

In that snippet all of the rows are the same height. It also states
that the feature is part of SWT. In the table I am looking for every
row could have a different height.

Thanks,
Bill Masek

Daniel Krügler wrote:
> On 15.01.2010 01:05, Bill Masek wrote:
>> I am trying to create a table that can have long and short lines as well
>> as different numbers of lines in each row.
>>
>> I have the MeasureItem, EraseItem and PaintItem snippet, but even when I
>> report the correct size for each entry all of the entries are same
>> height.
>>
>> 1. How do I create a table with rows having different heights?
>
> Not with SWT, which is affected by corresponding native limitations.
>
>> 2. Is there an easy way to wrap the text in a row or do I have to build
>> my own paint module for each item?
>
> Have a look at
>
> http://wiki.eclipse.org/index.php/JFaceSnippets#Snippet006Ta bleMultiLineCells
>
>
> Hint: It's a good idea to first check
>
> http://wiki.eclipse.org/index.php/JFaceSnippets
>
> which usually provides examples of interesting use cases.
>
> HTH & Greetings from Bremen,
>
> Daniel Krügler
Re: SWT Table with different sized rows and wrapped text [message #508254 is a reply to message #508094] Mon, 18 January 2010 07:00 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 15.01.2010 22:13, Bill Masek wrote:
> Thank you for responding.
>
> In that snippet all of the rows are the same height. It also states that
> the feature is part of SWT. In the table I am looking for every row
> could have a different height.

I understand that, but in your original posting you asked two different
questions, the second being answered by the corresponding link.

- Daniel


> Thanks,
> Bill Masek
>
> Daniel Krügler wrote:
>> On 15.01.2010 01:05, Bill Masek wrote:
>>> I am trying to create a table that can have long and short lines as well
>>> as different numbers of lines in each row.
>>>
>>> I have the MeasureItem, EraseItem and PaintItem snippet, but even when I
>>> report the correct size for each entry all of the entries are same
>>> height.
>>>
>>> 1. How do I create a table with rows having different heights?
>>
>> Not with SWT, which is affected by corresponding native limitations.
>>
>>> 2. Is there an easy way to wrap the text in a row or do I have to build
>>> my own paint module for each item?
>>
>> Have a look at
>>
>> http://wiki.eclipse.org/index.php/JFaceSnippets#Snippet006Ta bleMultiLineCells
>>
>>
>> Hint: It's a good idea to first check
>>
>> http://wiki.eclipse.org/index.php/JFaceSnippets
>>
>> which usually provides examples of interesting use cases.
>>
>> HTH & Greetings from Bremen,
>>
>> Daniel Krügler
Previous Topic:How to show a custom cursor while hovering over a menu bar?
Next Topic:How to set the title's color of a group?
Goto Forum:
  


Current Time: Thu Apr 25 04:42:07 GMT 2024

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

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

Back to the top