User Tools

Site Tools


SET STYLE ACTION

Guide Section: GUI of an EASAP
EASAP Tree: EVENT PROCESSING > ACTION


SET STYLE ACTION dynamically sets an USER INTERFACE STYLE or other CSS to a GUI object.

SET STYLE ACTION is triggered in one of two ways:

  1. Set style for a single object
  2. A VALUE CHANGED EVENT generated from a set of possible objects will set style for the changed object
SET STYLE ACTION
Essential Parameters:
Object: Select a GUI object from the dropdown or enter object references for objects whose style will be dynamically modified
Optional Parameters:
Style:Enter raw CSS text, select a USER INTERFACE STYLE or enter a SCALAR reference to dynamically bind to Object:
Do if:Enter a logical expression that must evaluate to true for the Object: style(s) to update
Default: true
Delimiter:Set a character to delimit objects in Object:
Default: % (ie. %objectname%)

Single object

To set a single object's style:

  • Right-click a BUTTON or other EVENT producing object
  • Select: Child > Add SET STYLE ACTION
  • Set the target object in Object: without '%' delimiters


Multiple objects

To trigger SET STYLE ACTION from a VALUE CHANGED EVENT:

  • Create two or more data entry objects:input1, input2 (for example)
  • Add an EVENT PROCESSING
  • Right-click its child EVENT
  • Select: Child > Add VALUE CHANGED
  • Set Objects: %input1%,%input2%,%input3% (delimiters are required for multiple objects)
  • Set Event Source: changedBox
  • Right-click the ACTION GROUP under the EVENT PROCESSING above
  • Select: Child > Add SET STYLE ACTION
  • Set Object: changedBox (the EVENT created in Event Source: above)

If an object in a group changes, only that object's style will be updated.

Screenshots showing the VALUE CHANGED and SET STYLE ACTION configuration below: