Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Font Style in draw2D label
Font Style in draw2D label [message #55767] Fri, 17 January 2003 21:46 Go to next message
Eclipse UserFriend
Originally posted by: oro7d3.netscape.net

How can I change teh font style (e.g. underline, bold the text) of a draw2D
label? I look at the javadoc, I can't find methods like setFont().

Thanks.
Re: Font Style in draw2D label [message #55793 is a reply to message #55767] Fri, 17 January 2003 21:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: noone.ibm.com

The draw2D label does have a setFont method, it is inherited from Figure.
It takes an SWT Font for an argument, check out the Font class in
org.eclipse.swt.graphics.
"oro" <oro7d3@netscape.net> wrote in message
news:b09sk8$lvd$1@rogue.oti.com...
> How can I change teh font style (e.g. underline, bold the text) of a
draw2D
> label? I look at the javadoc, I can't find methods like setFont().
>
> Thanks.
>
>
Re: Font Style in draw2D label [message #56566 is a reply to message #55793] Mon, 20 January 2003 16:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: oro7d3.netscape.net

Thanks. Can SWT Font have Underline style? I look it up, it only supports
Bold, Italic
Thanks
"Dan Lee" <noone@ibm.com> wrote in message
news:b09t21$maq$1@rogue.oti.com...
> The draw2D label does have a setFont method, it is inherited from Figure.
> It takes an SWT Font for an argument, check out the Font class in
> org.eclipse.swt.graphics.
> "oro" <oro7d3@netscape.net> wrote in message
> news:b09sk8$lvd$1@rogue.oti.com...
> > How can I change teh font style (e.g. underline, bold the text) of a
> draw2D
> > label? I look at the javadoc, I can't find methods like setFont().
> >
> > Thanks.
> >
> >
>
>
Re: Font Style in draw2D label [message #56671 is a reply to message #56566] Mon, 20 January 2003 18:27 Go to previous message
Eric Bordeau is currently offline Eric BordeauFriend
Messages: 259
Registered: July 2009
Senior Member
If you look at FontData.setStyle(int), you can see it sets the lfItalic and lfWeight fields on a
LOGFONT object (this is a Windows structure). LOGFONT also has an lfUnderline field. I'm not sure
why you can't set the font to be underlined. This question would probably be better suited for the
eclipse.tools newsgroup.

Eric


oro wrote:
> Thanks. Can SWT Font have Underline style? I look it up, it only supports
> Bold, Italic
> Thanks
> "Dan Lee" <noone@ibm.com> wrote in message
> news:b09t21$maq$1@rogue.oti.com...
>
>>The draw2D label does have a setFont method, it is inherited from Figure.
>>It takes an SWT Font for an argument, check out the Font class in
>>org.eclipse.swt.graphics.
>>"oro" <oro7d3@netscape.net> wrote in message
>>news:b09sk8$lvd$1@rogue.oti.com...
>>
>>>How can I change teh font style (e.g. underline, bold the text) of a
>>
>>draw2D
>>
>>>label? I look at the javadoc, I can't find methods like setFont().
>>>
>>>Thanks.
>>>
>>>
>>
>>
>
>
Previous Topic:Direct Edit in GEF
Next Topic:EMF or GEF?
Goto Forum:
  


Current Time: Sun Oct 06 08:42:09 GMT 2024

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

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

Back to the top