Display LED

0
heii I would like to display a boolean value with a LED in Mendix, so far I have only found a check box and a radio button. But that is rather intended as input. Can I download something from the marketplace that shows me a boolean value like a led or how can I do that?
asked
2 answers
0

You can just add 2 images for the on and off states. Then apply conditional visibility so only one is shown depending on the value of the boolean

answered
0

Hi,

In the custom-led.scss file, define the SCSS classes for the LED indicator. You can use CSS styles to create the LED effect.

/* LED Indicator for True (Green) */
.led-indicator.true {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #52d169; // add your color
}

/* LED Indicator for False (Red) */
.led-indicator.false {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ff6347; // add your color
}

In the "Class" field, bind the class dynamically based on the boolean attribute value

answered