Skip to main content



      Home
Home » Newcomers » Newcomers » StyledText Question
StyledText Question [message #60768] Tue, 03 May 2005 08:48 Go to next message
Eclipse UserFriend
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 #60775 is a reply to message #60768] Tue, 03 May 2005 15:17 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: StyledText Question [message #60779 is a reply to message #60775] Tue, 03 May 2005 15:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jaschulz.wiseware.com

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
Re: StyledText Question [message #61238 is a reply to message #60779] Fri, 06 May 2005 16:04 Go to previous message
Eclipse UserFriend
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
Previous Topic:Changing debug hotkeys
Next Topic:Moving Projects to a new Machine
Goto Forum:
  


Current Time: Wed Apr 30 13:17:47 EDT 2025

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

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

Back to the top