The styleClass Property Editor enables you to add style classes, also known as CSS rules, to the styleClass
property, or to bind the styleClass
property to a JavaBean that determines the style classes applied to this component at runtime. You open this property editor by clicking the ellipsis button (...) to the right of the styleClass
property for any component.
A typical use of the styleClass editor is to add CSS rules that you have defined in stylesheet.css
. You typically define these rules with the CSS Editor.
If you click the Use Value radio button at the top of the property editor, you see a list of CSS rules, also known as style classes, that you can add to the property. By default, these rules are defined in the style sheet stylesheet.css
and in the CSS files in the theme JAR file being used by the project (see About Themes). If you have added another style sheet to the project, those CSS rules appear also.
After clicking the Use Value button, you can:
styleClass
property by selecting an item in the Available list on the left and clicking the > button styleClass
property by selecting an item in the Selected list on the right and clicking the < button When you click OK, the choices you make in the Selected column are applied to the styleClass
property, and the component's appearance usually changes in the Visual Designer to match these CSS rules.
styleClass
property are overridden by corresponding style definitions in the component's style
property. If the rules you added do not have the expected effect on the component, look at the style definitions in the style
property.For an introduction to CSS, see the following web page:
For an online reference to CSS, see the following web page: