[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[ews.eclipse.technology.rap] Re: Table with multiline columns
|
Hi Austin and Markus,
I also need a table with multiline columns, but I can't implement it.Can
you give me some hints or some exactly simple code?
Thanks,
Cheney
On Tue, 21 Jul 2009 07:44:50 +0000, Markus Wolf wrote:
> Hello Austin,
>
> I helped myself with the problem by implementing a ContentProvider and
> LabelProvider which splits up the long text into multiple table rows.
> The input is wrapped by the ContentProvider and then send as model-
> elements to the table viewer. This aproach works quite well but it is
> not possible to have TableEditors with this. That the only drawback we
> have.
>
> But thanks for your input. :)
>
> Markus
>
>
>> There is a way to have some semblance of multi-line table rows in a
>> TableViewer if you don't mind a bit of hacking.
>>
>> I have a small experimental implementation that will interpret '\n'
>> characters in the text that is returned from the LabelProvider. It is
>> limited in ability, and it is unconventional, but if you need the
>> multi-line tables that bad you may find it helpful.
>>
>> Caveats:
>> 1. You must manually set the row height on the TableViewer. 2. The row
>> height will be consistent for all rows. 3. The text will be left
>> justified.
>> 4. Overflow is cut off.
>>
>>
>> If you are still interested I can post it.