Use a Slider to change the window color

0
Hey,  i’m new at Mendix and need some help to realize a small project. I want to use a slider with values from 0 to 255 to change the color of my window.  My idea is:  I create a  page with the slider with values from 0 to 255. If i change the values, i call a microflow by change event. In this microflow there is a “reading” block and a widget to change the color.  The color of the page should change simoultaneously with the slider value.  I cant find any matching widget or tutorial. Is it possible to realize this task?  Maybe someone can help me.  
asked
1 answers
6

Hi Henrik Waschke,

You can use a dynamic CSS class to define the color based on slider value.

For example:

===============

if $slider/sliderminvalue <=50 then ‘green’

else ‘red’ 

===============

likewise, you can define the CSS style.

You have to create a style under the theme source/... folder in the App directory.
Eg:

.green{

background-color: green;

}

answered