Skip to content

visible_when=False in Vgroup Tabbed still visible #758

@fred4ets

Description

@fred4ets

Hi there,

I'm facing the following issue.

If i set 2 traits items and set one of them to be not visible, it is stil visible.

I join a CME to be more explicit : Tab #1 should be not visible.

What am I doing wrong?

Thanks in advance.

Regards

PS : Debian 10 x86_64 / Python 3.7.3, with Traits libs from git source (Traits 6.1.0 dev1414 & TraitsUI 6.2.0 dev123)

#! /usr/bin/env python3

from traits.api import Int, Float, HasTraits
from traitsui.api import (Group, HGroup, Item, Tabbed, VGroup, View)

class Foo(HasTraits):

    a = Int
    b = Float

    view = View(Tabbed(VGroup(HGroup(Item('a')),
                              label='Tab #1',
                              visible_when='False'),
                       VGroup(HGroup(Item('b')),
                              label='Tab #2',
                              visible_when='True')))

if (__name__ == '__main__'):
    foo = Foo()
    foo.configure_traits()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions