Opened 7 years ago

Last modified 6 months ago

#11630 confirmed defect

unable to tab out of a GenericDatePickerCtrl

Reported by: mrooney1 Owned by:
Priority: normal Milestone:
Component: wxGTK Version: stable-latest
Keywords: wxComboCtrl Cc:
Blocked By: Blocking:
Patch: no


Reported after requested to do so in

I'm noticing that on Ubuntu 9.10 with wxPython I can tab into a DatePickerCtrl (Generic as is the case on GTK), but not tab out of, either forward or backward. I've pasted a minimal sample to demonstrate this at (and attached it); you'll notice you can tab into it from the second control and shift+tab back from the fourth, but there is no way to get out of it it appears!

Apparently on OSX tabs work as expected, so perhaps it is a bug in a GenericDatePickerCtrl?

Anyway, if this is a bug that needs to be fixed in wxPython but there is a workaround, I'd LOVE to hear it, however dirty it may be, as this bug in my app is milestoned to be fixed for the impending release.

Attachments (1) download (638 bytes) - added by mrooney1 7 years ago.
sample demonstrating the issue

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by mrooney1

sample demonstrating the issue

comment:1 Changed 7 years ago by jmsalli

  • Status changed from new to confirmed

I can reproduce the issue with the standard calendar sample. Thanks for reporting it.

comment:2 Changed 7 years ago by JMS

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [63158]) When checking whether the parent control has wxTAB_TRAVERSAL, take into account that the wxComboCtrl can be part of a composite control, such as generic wxDatePickerCtrl (fixes #11630).

comment:3 Changed 7 years ago by jmsalli

As a workaround, you could try using wx.TAB_TRAVERSAL style for the date picker control.

comment:4 Changed 7 years ago by mrooney1

Thanks for the lightning fast fix and the workaround, it works perfectly!

comment:5 Changed 7 years ago by jmsalli

  • Keywords wxComboCtrl added
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 2.8.10 to 2.9-svn

Reopened to remind that this bug still exists in wx2.9. Navigation code was changed, and the new wxGTK wxWindow::DoNavigateIn() doesn't seem to allow navigating out of composite controls (wxSearchCtrl seems to suffer from the same), even if focus is moved to the topmost part of the composite window prior to DoNavigateIn() call. Dispatching wxNavigationKeyEvent manually (as is done in wx2.8) does not work anymore either.

comment:6 Changed 7 years ago by jmsalli

  • Status changed from reopened to confirmed

comment:7 Changed 6 years ago by fsenore

I have found this problem too. I have checked and it still happens in the latest svn trunk.

I have also discovered a similar problem in Windows using the generic date picker control: TAB works until I open the combo. After opening the combo it is not possible to tab out of the control any more.

I read in wxBlog that a new class (wxNavigationEnabled) has been added to fix a similar problem (at least it looks similar).
Are there chances that that class could fix this problem too?

comment:8 Changed 4 years ago by maximand

I'm noticing that on Ubuntu 12.04 with wxWidgets-2.9.4 (or trunk) I can tab into a wxDatePickerCtrl, but not tab out of.
If Ctrl+TAB pressed i've got message:
../src/gtk/window.cpp(3512): assert "Assert failure" failed in DoNavigateIn(): not implemented

comment:9 Changed 4 years ago by vadz

Strangely enough I don't see this assert when pressing Ctrl+TAB in the date picker dialog of the calendar sample.

But the original bug still stands, it's true that something is wrong with our TAB navigation implementation for composite controls...

comment:10 Changed 6 months ago by will133

Unfortunately, I still see this issue on wxPython I also can't seem to find a way to work around this as well. Please let me know if there's something that can be done.

Note: See TracTickets for help on using tickets.