<div><font>I am developing a default rlo file for Xerte 2.18 individual page template projects and have a working experimental layout editor included that sets as many colours and positions for things as I can find how to do. </font><br>
</div><div><font><br></font></div><div><font>There are some settings that I have not found a way to set from a script so these I have to set using a style sheet. The example in this case is the titleBarColour.<br></font></div>
<div><font><br></font></div><div><font>I am experiencing something rather strange.</font><font><br></font></div><div><font><br></font></div><div><font>I have a style sheet and all it does is set the titleBarColour to red<br>
</font></div><div><font><br></font></div><div><font>colourScheme {<br> titleBarColour: 0xFF0000;<br> }<br></font></div><div><font><br></font></div><div><font>If I load the style sheet via the property panel of the learning object then all is well and all it does is set the titleBarColour to red and the rest of the screen settings that I have set in code work correctly.<br>
</font></div><div><font><br></font></div><div><font>However if instead of using the property panel I use a field in the xwd form associated with the learning object and then use the code<br></font></div><div><font><br></font></div>
<div><font>//stylesheet<br>if (templateData.learningObject[0].stylesheet != undefined){<br> rootIcon.loadStyleSheet(expression(templateData.learningObject[0].stylesheet, this));<br>}<br></font></div><div><font><br></font></div>
<div><font>to load the style sheet, then all the colour settings that I have made by script get reset. The screen flashes briefly with my set colours and then reverts to the default colours other than those set in the style sheet. Which is not what I want to happen.<br>
</font></div><div><font><br></font></div><div><font>I have attached a pdf with screen shots showing the difference.<br></font></div><div><font><br></font></div><div><font>Is there a way of loading the stylesheet using the xwd form without having it overwrite the changes I have made in script? </font></div>
<div><font><br></font></div><div><font>Incidentally this even happens if I run my script to change the screen settings after I run the script that loads the style sheet. </font></div><div><font><br></font></div><div><font>You can see settings such as button position persist, just the colours settings are rendered ineffective.<br>
</font></div><div><font><br></font></div><div><font>Kind regards<br></font></div><div><font><br></font></div><div><font>Johnathan<br></font></div>