So I have a problem with my traitsUI code. What I want to have is a List that is shown using CheckListEditor() and is in a confined space so it could be scrollable. I need to have this List in a Group because this would be only a small part of the whole GUI. Yet if I set Group property "scrollable" to "True" that does nothing. Any ideas? Here is minimal working example:
from traits.api import HasTraits, List
from traitsui.api import View, ListEditor, Group, Item, CheckListEditor, Group
class Foo(HasTraits):
my_list = List()
full_list = List()
def _full_list_default(self):
return [str(n) for n in range(10)]
traits_view = View(Group(Item('my_list',
style='custom',
editor=CheckListEditor(name = 'full_list')),
scrollable = True,
orientation = 'vertical'),
height=100)
if __name__ == '__main__':
f = Foo()
f.configure_traits()