StyledText Question [message #60768] |
Tue, 03 May 2005 08:48  |
Eclipse User |
|
|
|
Originally posted by: jaschulz.wiseware.com
As I understand it the SWT StyledText widget supports only BOLD and
ITALIC styles. I need a widget that also supports UNDERLINE, SUBSCRIPT
and SUPERSCRIPT. Is it possible to modify the SWT StyledText widget to
make it handle these extra styles? Can someone point me to an example
that would get me started in this direction? Or is this a hopeless quest?
Thanks,
JAS
|
|
|
|
|
Re: StyledText Question [message #61238 is a reply to message #60779] |
Fri, 06 May 2005 16:04  |
Eclipse User |
|
|
|
Sounds like underline is newer than the version of Eclipse that you are
using.
The console used to underline by calling drawLine(), but that was a
pain. If using a newer version of Eclipse is an option, you may want to
consider it.
3.1 M7 will be out next week!
Kevin
James A. Schulz wrote:
> Keven,
>
> That doesn't work for me. If I write:
>
> myStyleRange.underline = true;
>
> Eclipse complains: "myStyleRange.underline cannot be resolved or is not
> a field".
>
> Ordinarily (i.e. with Bold and Italic styles) I use:
>
> myStyleRange.fontStyle = SWT.BOLD;
>
> but Eclipse does not recognize SWT.UNDERLINE.
>
> Am I missing something?
>
> JAS
>
> Kevin Barnes wrote:
>
>>
>> StyledText now supports underline. AFAIK it does not support subscript
>> or superscript.
>> to use underline, you only need to set StyleRange.underline=true on
>> your StyleRange.
>> HTH
>> Kevin
>>
>> James A. Schulz wrote:
>>
>>> As I understand it the SWT StyledText widget supports only BOLD and
>>> ITALIC styles. I need a widget that also supports UNDERLINE,
>>> SUBSCRIPT and SUPERSCRIPT. Is it possible to modify the SWT
>>> StyledText widget to make it handle these extra styles? Can someone
>>> point me to an example that would get me started in this direction?
>>> Or is this a hopeless quest?
>>>
>>> Thanks,
>>>
>>> JAS
|
|
|
Powered by
FUDForum. Page generated in 0.13043 seconds