Hi Herb,
In the case of custom controls in custom sections you should use "Property selectors". See below.
Code:
btn = createObject("CommandButton")
// you can add custom properties to any object like this
btn.btnstyle = "1"
// now in your CSS you can apply CSS depending on the value of custom properties
btn.css = 'lianja_ui_commandbutton["btnstyle"="1"] { color: red; } lianja_ui_commandbutton["btnstyle"="2"] { color: blue; }'
Note that the property selectors should be lower case.
You can use global CSS styles by specifying the CSS file in the App, Page, Section attributes.
If you are changing the properties and you want the CSS to be reapplied issue a redraw() on the object.
Bookmarks