[wx-dev] #9542: wx.lib.masked.timectrl.py focus/selection issues on
wxMac
wxTrac
noreply at wxsite.net
Thu Jun 5 12:55:13 PDT 2008
Ticket URL: <http://trac.wxwidgets.org/ticket/9542>
#9542: wx.lib.masked.timectrl.py focus/selection issues on wxMac
----------------------+-----------------------------------------------------
Reporter: dolhop | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxPython | Version: 2.8.7.1
Keywords: | Blockedby:
Patch: 1 | Blocking:
----------------------+-----------------------------------------------------
Using wxMac v2.8.7.1, wx.lib.masked.timectrl.py, the TimeCtrl class does
not remember selection/focus when using the spin buttons.
The issue can easily be reproduced using the wxPython demo:
1. start the demo and run the TimeCtrl example.
2. using the 24hr ctrl with spin buttons, using the mouse move the cursor
to the minutes field for example.
3. now use the mouse to click the up/down spin buttons and notice that
the hours field is always updated.
4. using the keyboard, if you move the cursor to a different location
(such as the minutes field again) and press the up/down keyboard arrow
keys, the correct field will be updated (and stored - if you now use the
mouse on the spin buttons the field last edited with the keyboard will be
updated).
This is NOT an issue on wxMSW.
Below is a patch that works for me:
{{{
--- /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/wx-2.8-mac-unicode/wx/lib/masked/timectrl.py 2008-06-05
15:39:57.000000000 -0400
+++ /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/wx-2.8-mac-unicode/wx/lib/masked/timectrl.py.fixed 2008-06-05
15:40:48.000000000 -0400
@@ -1141,6 +1141,7 @@
This is the function that gets called in response to up/down
arrow or
bound spin button events.
"""
+ self.__posCurrent = self.GetInsertionPoint()
self.__IncrementValue(key, self.__posCurrent) # changes the
value
# Ensure adjusted control regains focus and has adjusted portion
}}}
--
Ticket URL: <http://trac.wxwidgets.org/ticket/9542>
More information about the wx-dev
mailing list