We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider this code:
from traits.api import HasTraits, Str from traitsui.api import View, Item, Label, UItem class Foo(HasTraits): a_string = Str() fixed_string = Str("a_string is true (according to UItem)") traits_view = View( Item("a_string"), Label("a_string is true (according to Label)", visible_when="a_string"), UItem("fixed_string", style="readonly", visible_when="a_string"), Label("len(a_string) is nonzero (according to Label)", visible_when="len(a_string)"), width=420, height=200 ) Foo().configure_traits()
When a_string is the empty string (therefore False):
a_string
Label(visible_when="a_string")
UItem
visible_when
Label(visible_when="len(a_string)")
Tried on main with pyside2.
main
pyside2
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Consider this code:
When
a_string
is the empty string (therefore False):Label(visible_when="a_string")
does not get hiddenUItem
with the samevisible_when
, and theLabel(visible_when="len(a_string)")
, correctly do get hiddenTried on
main
withpyside2
.The text was updated successfully, but these errors were encountered: