5.8.4 Three State Buttons

CTC uses 3-state buttons in various areas. They are used typically for two purposes:

  • Positive/negative selection e.g. for filters

  • Adding/removing items in Group Editing

If the background of such a button is green, it means that the object needs to have the property to be included in the selection (filter) or that a property should be added (group editing)

If it is red, then the object must not have the property to be included in the selection (filter) or that a property should be removed (group editing)

The third state has a neutral background – the property should be ignored and left alone.

You can change the state of the button by clicking on it – cycling through the states until the one you want to get.

In some instances only two of the three states are used, e,g, in cases where property values can be changed.

In filter functions you can mark more than one property: the object must then meet all requirements to be considered.

For example, in the Trainschedule Filter, if you hit both the Monday and Tuesday button to turn green, than the schedule marked to run on both Mondays and Tuesdays will be included. If the same buttons are red, then schedules that won’t run on either Monday or Tuesday should be considered.

If, however, you want a list of schedules that run on either Monday or Tuesday (or both), you have to use the filter twice: one for Monday, add the result to the selection list, and then again for Tuesday. And if you a need a list of schedule that runs on Monday, Tuesday, but not on both, you meed to use the filter a third time: set it to select both Monday and Tuesday, but now remove the result from the selection list. Note, that the weekday markings of other weekdays, are irrelevant in this consideration.

In this example of a filter for blocks, the instruction for the filter is to select blocks that definitely have a station but are not bidirectional