enthought / enthought/traitsui

"springy" attribute not honored

Open
#169 2 comments 0 reactions 0 assignees View on GitHub
toolkit: Qt
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

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:

``` python
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
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.