Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wx: tab cannot jump between groups #2036

Open
greschd opened this issue Aug 24, 2023 · 0 comments
Open

wx: tab cannot jump between groups #2036

greschd opened this issue Aug 24, 2023 · 0 comments

Comments

@greschd
Copy link
Contributor

greschd commented Aug 24, 2023

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:

Recording.2023-08-24.081958.mp4

With wx:

Recording.2023-08-24.082517.mp4

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:

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:

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 #1461 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant