The developer in this example would like to set a base CSS style programatically after the onArrive event is fired, while having changed the position of the output field manually.
The global CSS style BaseCSS is defined in the application styles settings.
Code: Select all
var currentstyle = { "_base":"BaseCSS"};
var element= FIELDS("Z2");
element.setProperty("style",currentstyle );
element.refresh();Consider this code to achieve the expected result.
Code: Select all
var element= FIELDS("Z2");
//get the current style
var currentstyle = element.setProperty("style");
//add the _base in the current style
currentstyle._base = "BaseCSS";
//Set the current style
element.setProperty("style",currentstyle );
element.refresh();