enthought / enthought/traitsui
wx: tab cannot jump between groups
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
When using the `wx` backend, the `Tab` key to switch between input fields does not work as expected. In particular, it does not (always) move between groups.
See the following example:
With the `qt` backend:
https://github.com/enthought/traitsui/assets/5692808/d683fb15-d497-4250-900b-f00934eab018
With `wx`:
https://github.com/enthought/traitsui/assets/5692808/f9d9bc18-30f7-42f5-ba92-c56a811fbd88
Note how the cursor can jump out of the tabbed group, but not back in. It also never reaches the `OK` and `Cancel` buttons.
Example code:
```python
from traits.etsconfig.api import ETSConfig
ETSConfig.toolkit = 'wx'
# ETSConfig.toolkit = 'qt'
from traits.api import HasTraits, Str
from traitsui.api import View, Item, Group, Tabbed
class Test(HasTraits):
foo = Str()
bar = Str()
test_view = View(
Group(
Item('foo'),
Item('bar'),
Tabbed(
Group(
Item('foo'),
Item('bar'),
),
Group(
Item('foo'),
Item('bar'),
),
),
),
buttons=['OK', 'Cancel'],
resizable=True,
)
test = Test()
test.configure_traits(view=test_view)
```
The cursor never reaching the buttons is also reproducible without `Group` or `Tabbed`:
```python
test_view = View(
Item('foo'),
Item('bar'),
buttons=['OK', 'Cancel'],
resizable=True,
)
```
Tested on Windows with:
```
numpy==1.25.2
Pillow==9.5.0
pyface==8.0.0
Pygments==2.16.1
PyQt6==6.5.2
PyQt6-Qt6==6.5.2
PyQt6-sip==13.5.2
six==1.16.0
traits==6.4.2
traitsui==8.0.0
wxPython==4.2.1
```
May be related to https://github.com/enthought/traitsui/issues/1461#issuecomment-1691074605
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.