How to set style property in oxy_label

<oXygen/> general issues.
daliboris
Posts: 18

How to set style property in oxy_label

Wed Jul 03, 2013 2:25 pm

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: 6055

Re: How to set style property in oxy_label

Wed Jul 03, 2013 2:53 pm

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: 18

Re: How to set style property in oxy_label

Wed Jul 03, 2013 3:56 pm

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: 6055

Re: How to set style property in oxy_label

Wed Jul 03, 2013 4:01 pm

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

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 0 guests