enthought / enthought/traitsui
Bug in VGrid with VGroup inside?
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
I have recently discovered the `VGrid` type of group in TraitsUI (after writing my own of course). But the following code snippets don't give the same result althought I would expect them to:
```
from traits.api import HasTraits, Range
from traitsui.api import View, Item, VGrid, VGroup
class A(HasTraits):
x = Range(1, 10)
x2 = Range(1, 10)
x3 = Range(1, 10)
x4 = Range(1, 10)
view = View(
VGrid(
Item("x"),
Item("x2"),
Item("x3"),
Item("x4")
)
)
a = A()
a.configure_traits()
```

But when we encapsulate Items inside Groups, the 2 column layout is lost:
```
from traits.api import HasTraits, Range
from traitsui.api import View, Item, VGrid, VGroup
class A(HasTraits):
x = Range(1, 10)
x2 = Range(1, 10)
x3 = Range(1, 10)
x4 = Range(1, 10)
view = View(
VGrid(
VGroup(Item("x")),
VGroup(Item("x2")),
VGroup(Item("x3")),
VGroup(Item("x4"))
)
)
a = A()
a.configure_traits()
```

Is this a bug or am I missing something?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.