Allow Styles to be set by variable for expressions etc.
5645
Views
4
Comments
Implemented
Frontend (App Interfaces)
OutSystems 5.0
I would like to set and modify styles from a variable.  
This is a must have to create more visual appealing applications.
2016-11-21 23-23-05
Gonçalo Borrêga
Hi guys,
You can do that by using an Extended Property (instead of the Style property) on the element you want to change. 
Just use "style" or "class" as the name of the extended property, and in the value type any expression you want.

if you set "class", that will override what the platform renders as the "class" html property of the element, so rememeber to add there the values you had on the Style property. If you use style, it will be added and take precedence over what is rendered by the platform.

Unlimited possibilities.

Could someone explain how we add custom classes in studio 10 so we can use them in this manner?

Hi guys,

what if I want to make dynamic the extended property value using a js?

something like:

Extende Property 

name: style

value: 

"background-color: " + 
"<script>
document.write(anyJsCall('"+ListRecords1.List.Current.Tag+"'));
</script>"+";"


Unfortunately this seems not to work...