How to add colors to group box according to some constraints.

0
How to add colors to group box according to some constraints in Mendix.
asked
2 answers
2

Hi Chandra,

 

                       To add colors to group box pls follow below steps

1.Fst in visual  studio code create classes for group boxes for example like below

.group-box-red{

    .mx-groupbox-header {

        border-width: 0px;

        color: #AD1523;

        background: #FFCDD2;

        border: 1px solid #AD1523;

    }

you can add as many classes you want according to your requirement.

2.Go the page in the properties of the group box go to dynamic class

there u need to write the logic  like if your if entity/attribute = your condition then ‘.group-box-red’

like this you can add all your conditions and color you want for which condition,

 

Let me know if you have any questions.

answered
1

Depending on what you want colored and what colors you want, there are two options:

  1. Use dynamic classes to conditionally add "groupbox-danger" or "groupbox-success" (I think options are: primary, danger, warning, success, info, inverse, white, transparent, default)
  2. Use dynamic classes to conditionally add your own class(es) and define these in your scss

Edit: forgot primary

answered