enthought / enthought/traitsui

Bug in VGrid with VGroup inside?

Open
#406 1 comment 0 reactions 0 assignees View on GitHub
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()
```
screen shot 2017-11-15 at 4 30 26 pm

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()
```
screen shot 2017-11-15 at 4 29 44 pm

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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.