How to set style property in oxy_label

Oxygen general issues.
daliboris
Posts: 26
Joined: Thu Feb 11, 2010 5:00 pm

How to set style property in oxy_label

Post by daliboris »

Hello, I can't figure out how to set style property in oxy_label() function. There is no example in documentation how to use "style" property.

I want set font-size for the label to 2em - how can I do it with oxy_label()? Is it possible, or not?

Thank you for your suggestions.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to set style property in oxy_label

Post by Radu »

Hi,

You are right, our documentation on this is not helpful, we'll work on this.
In your case the CSS should be something like:

Code: Select all

:root{
content: oxy_label(text, "Label Text", styles, "font-size:2em;");
}
Basically the value of styles is a small CSS fragment, it can also be something like:

Code: Select all

:root{
content: oxy_label(text, "Label Text", styles, "font-size:2em;color:red;");
}
in order to both have a larger font and a certain color and so on.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
daliboris
Posts: 26
Joined: Thu Feb 11, 2010 5:00 pm

Re: How to set style property in oxy_label

Post by daliboris »

Thank you Radu, it works.

But this means that Help for XML Author (downloaded this weak from http://www.oxygenxml.com/doc/Author-UserManual.pdf) is not up-to-date. There is property called "style" not "styles" on page 368.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to set style property in oxy_label

Post by Radu »

Hi Boris,

Glad it works.
I noticed that too when I was writing my small example and an issue is already opened for this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply