Jump to content

UniLabel Change Font Color


cristianotestai
 Share

Recommended Posts

Hi Farshad,

 

I have a UniLabel with the caption: <a href="mailto:cristiano.testai@gmail.com"> cristiano.testai@gmail.com </ a>

to be a link to the email, and is ok.

 

When running UniLabel always get a blue font and underlined. I want to change the font color and remove the underlined, but I tried the events OnAfterrender and OnMouseOver but does not work.

I saw that if the UniLabel have a reference in the caption as it is to be a link and the property textConversion = txtHTML happens this issue.

 

Thanks.

Link to comment
Share on other sites

A green link for you here :rolleyes:

<a href="#" style="text-decoration: none; color: #00FF00">test test test</a>

 

Hi,

 

Thanks zilav..

 

Now, how to set the caption of UniLabel in JS onMouseOver event?

 

I tried ...MainModule.Unilabel.setText('<a href="#" style="text-decoration: none; color: #00FF00"> test test test </ a>'), but does not work.

 

Thanks.

Link to comment
Share on other sites

Now, how to set the caption of UniLabel in JS onMouseOver event?

 

You want to change the style or label's text on mouse over? Well, changing the text itself on mouse hovering is... unnatural, so I assume you want to change some style properties:

 

<a onmouseover="this.style.color='#FF0000';" onmouseout="this.style.color='#000000';">test test test</a>

Link to comment
Share on other sites

You want to change the style or label's text on mouse over? Well, changing the text itself on mouse hovering is... unnatural, so I assume you want to change some style properties:

 

<a onmouseover="this.style.color='#FF0000';" onmouseout="this.style.color='#000000';">test test test</a>

 

zilav,

 

yes .. is the style i need to change, in this case is the underline.

 

How can I include the "onmouseover" and "onmouseout" to the code below?

 

<a href="mailto:falecom@modenadesign.com.br" style="text-decoration: none; color: #414141"> falecom@modenadesign.com.br </ a>

 

thanks.

Link to comment
Share on other sites

zilav,

 

yes .. is the style i need to change, in this case is the underline.

 

How can I include the "onmouseover" and "onmouseout" to the code below?

 

<a href="mailto:falecom@modenadesign.com.br" style="text-decoration: none; color: #414141"> falecom@modenadesign.com.br </ a>

 

thanks.

Ok here is the full list of all available "this.style" properties to alter with javascript

http://www.comptechdoc.org/independent/web/cgi/javamanual/javastyle.html

Link to comment
Share on other sites

  • 5 months later...

Hi Farshad,

 

I tried this code in uniLabel.Caption (txtHTML mode)

 

<a onmouseover="this.style.textDecoration='underline';this.style.color='#0080FF';" onmouseout="this.style.textDecoration='none';this.style.color='#000000';">Geri bildirimde bulun...</a>

 

Everything is fine. Both color and underline is changing on mouse over..

 

But because it's written in Caption, not readable on design time really.

 

I can apply changing Form.OnCreate may be, but this time, I have to change all nail characters with #39 which is not efficient.

 

Is there a quick and visible way of this. (Some extra htlmText property may be, supporting multiline input editor would be nice);

 

Thanks

Link to comment
Share on other sites

  • Administrators

Hi Farshad,

 

I tried this code in uniLabel.Caption (txtHTML mode)

 

Geri bildirimde bulun...

 

Everything is fine. Both color and underline is changing on mouse over..

 

But because it's written in Caption, not readable on design time really.

 

I can apply changing Form.OnCreate may be, but this time, I have to change all nail characters with #39 which is not efficient.

 

Is there a quick and visible way of this. (Some extra htlmText property may be, supporting multiline input editor would be nice);

 

Thanks

 

Logged #1351

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...