Hello,
I'm trying to lay out a traits view nicely, with a graph on one side and some controls on the other side. I'd like the controls to take up a fixed width and the graph to expand when the view is resized. However, depending (somehow, haven't figured out how) on the items in the group, both columns resize at the same time, despite one being springy and the other not. I'm using traitsui 4.4.0
I can reproduce the issue fairly easily here:
from traits.api import HasTraits, Float, Range, Button
from traitsui.api import View, HGroup, VGroup, Item, Spring
class foo(HasTraits):
size = Range(2.,20.,5.)
test = Button()
expunge= Button()
duration = Float(10)
traits_view = View(
HGroup(
VGroup(
Item(name="size",resizable=False),
Item(name="test",width=100,springy=False),
Item(name="duration"),
springy=False,
),
Item(name="expunge",springy=True),
),
resizable=True,
)
pass
f = foo()
f.configure_traits()
'''
Perhaps I'm being silly, but it looks to me like the "springy" attribute is not being honoured...
thanks,
Richard
Hello, I'm trying to lay out a traits view nicely, with a graph on one side and some controls on the other side. I'd like the controls to take up a fixed width and the graph to expand when the view is resized. However, depending (somehow, haven't figured out how) on the items in the group, both columns resize at the same time, despite one being springy and the other not. I'm using traitsui 4.4.0 I can reproduce the issue fairly easily here: