Underlined text in a Label [message #762986] |
Thu, 08 December 2011 18:04  |
Eclipse User |
|
|
|
Hello,
I am using 1.5M2.
I am unable to get underlined text in a Label after I change the Label's font... to be clear -- if I don't use the setFont() I do get the underline.
I created a custom variant in my CSS file:
Label.link {
text-decoration:underline;
}
I set the custom variant on my label like this:
label.setData( WidgetUtil.CUSTOM_VARIANT, "link" );
Is there something I am missing?
Regards,
-mikhail.
|
|
|
|
|
|
|
Re: Underlined text in a Label [message #763319 is a reply to message #763282] |
Fri, 09 December 2011 09:56   |
Eclipse User |
|
|
|
yes, this is what I meant, sorry that it doesn't work. Are you aware of
the Link widget? It can be used to display text with links. The links
are underlined.
Regards,
Rüdiger
On 09.12.2011 14:48, mnefedov wrote:
> I need a little more guidance on this. This is what I tried, and it
> didn't work:
>
>
> Composite composite = new Composite( parent, 0 );
> composite.setFont( a_font );
> // composite... layout stuff
>
> Label label = new Label( composite, SWT.CENTER );
> // NO FONT SETTING!
> label.setText( a_text );
> label.setData( WidgetUtil.CUSTOM_VARIANT, "link" );
> // layout stuff...
>
> Is this what you meant?
> Regards,
> -mikhail.
--
Rüdiger Herrmann
http://codeaffine.com
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07263 seconds