EnumClass

Content Type: Widget
Categories: User Interface

Overview

This widget will allow you to add classes to elements, based on an attribute's value. Additionally, you can replace the value by a Glyphicon and give that a certain class. Subsequently, you can add CSS to these classes and thereby base the styling of an element, its parent or its row on the value of a certain attribute.

Documentation

Documentation

Description

This widget will allow you to add classes to elements, based on an attribute's value. Additionally, you can replace the value by a Glyphicon and give that a certain class. Subsequently, you can add CSS to these classes and thereby base the styling of an element, its parent or its row on the value of a certain attribute.

Typical usage scenario

  • Color a label, based on the value that it displays.
  • Highlight rows in a Template Grid, based on the status of the row object.
  • Show an image for a status attribute, and color the image based on the status value.

Features and limitations

  • Classes can be added to the element itself, its parent or its Template Grid Row.
  • Values can be replaced by Glyphicons, which can get a tooltip and a class, based on the value.

Configuration

  1. Add the widget inside an object context.
  2. Select the attribute that contains the value which should determine the class.
  3. Per possible value, specify the class that should be added. Optionally, you can specify a custom caption. This will override the displayed value or will be used as the title attribute of the glyphicon.
  4. Select the element that the class should be applied to: the label itself, its parent or its templategrid row.
  5. When you want to replace the element by a glyphicon, specify the name of the glyphicon.

Releases

Version: 1.3.0
Framework Version: 8.12.5
Release Notes: Fix for primitive (attribute) scenario not adding classes on load
Version: 1.2.1
Framework Version: 8.0.0
Release Notes: Removed invalid application.id file
Version: 1.2.0
Framework Version: 8.0.0
Release Notes: Made compatible with Mendix 8 in combination with list view