Page 1 of 1

How to set style property in oxy_label

Posted: Wed Jul 03, 2013 2:25 pm
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.

Re: How to set style property in oxy_label

Posted: Wed Jul 03, 2013 2:53 pm
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

Re: How to set style property in oxy_label

Posted: Wed Jul 03, 2013 3:56 pm
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.

Re: How to set style property in oxy_label

Posted: Wed Jul 03, 2013 4:01 pm
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