Modify Class

This action will add or remove a CSS Class from a field on the interface.

Explanation

CSS Class can be defined inside the skin CSS via the CSS Style Builder and applied to fields during interface automation triggers; When Field Gains Focus, When Field Loses Focus, When Field Is Changed, When Field Is Clicked, When Field Is Entered, or When Field Is Left.

An Example application would be a class that adds a drop shadow around an element to indicate it is the active element when the mouse enters the field and to remove that class when the mouse leaves that field.

Settings

Action

This setting determines if the action is adding or removing a class. There is no harm in trying to add a class to an element if it already has that class and conversely there is no harm it trying to remove a class from an element that does not have the class. These actions are not cumulative in any way adding the same class multiple times will be removed by a single removal action.

Class

This is the class that is defined in the skin that will be applied to the element.

Target Field

This setting allows the software developer to target a field other than the one being interacted with. If this is left blank then the field that is triggering the action will receive the class.

Target Field Part

In interfaces such as list and field grids the field has two parts that make up the full render, the label and the data. This setting allows the software developer to target a certain part of the field. For example you might want to change the class of the label for a field when interacting with the data part of the field but you don't want to change the data area. If one action applies the class to the full field and a second action removes the class from just the data portion of the field the class will still be present on the label till it is removed by another action that removes it from the full field or the label.

Describe this action

Useful as a comment, this description will overwrite the automatically generated description in the Action Manager.

action type - modify class.txt · Last modified: 2016/09/14 18:19 (external edit)
Copyright WorkXpress, 2024