I have a few solutions which use onRender to change colour of lines, but I have found that there is a performance penalty with that, and I am trying to use css to achieve the same thing.
Some of my current solutions are SAAS, and have a ‘superuser’ form on which I identify the various colours for each tenant. I then set some globals from that, and use the link to the superuser form per tenant to show different colours per group of users. It works very well.
In moving to CSS, I now don’t seem to be able to rewrite my stylesheet on the fly. I don’t want to have to have a different stylesheet per tenant, but rather have one stylesheet whose data is written by an interrogation of the superuser form.
Perhaps I am missing something obvious, or perhaps ti s not possible.
I haven’t tried this before, but it should be possible. Just use the solution model and change the style. You have to do this in onSolutionOpen, as once a form is loaded, the style is locked in.
var style = solutionModel.getStyle('my_existing_style')
//Change the Style
style.content = 'combobox { color: #0000ff;font: italic 10pt "Verdana";}'
And if you need more advanced, you can always use the Solution Model to edit your form, and change the Style name of that form. You can also create new Styles on the fly, then assign them to forms. So, it should be possible, but will take some work.