In TraitsUI, for an Item(), is it possible to setup a visible_when() parameter list with more than 1 item?
For example, I'd like something like this:
Group(
Item(FirstItem, visible_when = 'foo == 1 and bar == 0'),
Item(SecondItem, visible_when = 'foo == 0 and bar == 1),
Item(ThirdItem, visible_when = 'foo == 0 and bar == 0)
)
So that only FirstItem, SecondItem, or ThirdItem would show up based on the values in foo and bar.
Is this possible? I've made an initial attempt, but had no luck (which may be because one of my logic tests involves a string -- is my problem having a string test inside the visible_when string? This is what my visible_when test looks like (and isn't working):
visible_when = 'Initial_value == 1 && display_units == \'SI\'',
I've tried with the SI in double quotes "SI" and with the escaped single quotes as above...neither worked for me. I've also tried using 'and' and '&&' with no difference either.