[wx-dev] #9538: wxCalendarCtrl not receiving keyboard focus on mouseclick

wxTrac noreply at wxsite.net
Thu Jun 5 07:54:30 PDT 2008


Ticket URL: <http://trac.wxwidgets.org/ticket/9538>

#9538: wxCalendarCtrl not receiving keyboard focus on mouseclick
--------------------------+-------------------------------------------------
 Reporter:  BuschnicK     |       Owner:         
     Type:  defect        |      Status:  new    
 Priority:  normal        |   Milestone:         
Component:  GUI-generic   |     Version:  2.8-svn
 Keywords:  calendarctrl  |   Blockedby:         
    Patch:  1             |    Blocking:         
--------------------------+-------------------------------------------------
 Hello,

 wxCalendarCtrl seems to have a bug on Windows with wxWidgets 2.8.7
 correctly capturing keyboard input.
 Keyboard input is only captured after klicking somewhere on the calendar
 control's region, that's not specifically handled in the control's onclick
 handler. If you click on a specific date instead the control will not get
 keyboard focus.

 To reproduce do the following in the calendar sample application:
 - click into the month selection combobox
 - click on a day in the calendar
 - use the keyboard arrow keys to navigate
 -> the keyboard still changes the combobox until you click on the calendar
 "dead area" at least once.

 I have fixed this by adding an "event.Skip()" to
 void wxCalendarCtrl::OnClick(wxMouseEvent& event)
 that will get executed no matter what we hit. That way the owning control
 will correctly perform the keyboard focus transition. Could a similar fix
 be integrated into the official release please?

 regards,

 Sören


--
Ticket URL: <http://trac.wxwidgets.org/ticket/9538>


More information about the wx-dev mailing list