style

To provide something similar to Cascading Style Sheets (CSS) available in HTML, styles can be defined in a tag and referenced in the style attribute of widget tags.

Syntax

<style id="style-name" value="value-string"/>

Attributes

Attribute

Values

Restrictions

Description

id

string

Must not contain a semicolon

The ID to use when referencing the style. 

value

string

Must not contain any circular references to itself.

Value contains a style hint string following the same format used in the style attribute of other tags. 

Examples

The following example applies button style hints as defined in the predefined style CommandButtonStyle. Note that the “Stop” button has an additional hint applied (size:big), and overrides the background color (bg#ff0000).

<style id="ButtonStyle" value="bg#808000;bdr:etched;"/>

<button name="Start" style="style:ButtonStyle;"/>

<button name="Stop" style="style:ButtonStyle;size:big;bg#ff0000;"/>

<button name="Reset" style="style:ButtonStyle;"/>

 

Figure 75 - Style Tag Example