Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Underlining Fonts in SWT 3.0 M7/Linux/GTK
Underlining Fonts in SWT 3.0 M7/Linux/GTK [message #439511] Mon, 12 July 2004 21:47 Go to next message
Eclipse UserFriend
Originally posted by: coraestrada.yahoo.com

There seems to be no easy way to underline Fonts in SWT/Linux/GTK.
Font.java only takes the styles: NORMAL, BOLD, ITALIC as parameters to the
constructor.

Looking into the source code, font underlining is definitely supported in
OS.java through pango - has anyone implemented this on their own? I would
assume a starting point would be
org.eclipse.swt.graphics.Graphics::drawText.

thanks for any suggestions,
Re: Underlining Fonts in SWT 3.0 M7/Linux/GTK [message #439526 is a reply to message #439511] Tue, 13 July 2004 09:11 Go to previous message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
Hi,

I was having the same problems and am now using Eclipse Forms Hyperlink
Widget to underline Labels. I think that widget is not setting underline
via pango, but drawing it via GC (making it platform independant).

See:
http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/pde-ui-h ome/working/EclipseForms/EclipseForms.html?rev=1.7&conte nt-type=text/html

Ben

> There seems to be no easy way to underline Fonts in SWT/Linux/GTK.
> Font.java only takes the styles: NORMAL, BOLD, ITALIC as parameters to the
> constructor.

> Looking into the source code, font underlining is definitely supported in
> OS.java through pango - has anyone implemented this on their own? I would
> assume a starting point would be
> org.eclipse.swt.graphics.Graphics::drawText.

> thanks for any suggestions,
Previous Topic:TreeViewer and Wizard Page
Next Topic:Eclipse plugin development
Goto Forum:
  


Current Time: Tue Apr 23 06:02:52 GMT 2024

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

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

Back to the top