[wxPython-users] info bubble and annotation over grid cell UPDATED
Robin Dunn
robin at alldunn.com
Thu Nov 2 20:43:35 PST 2006
Timothy Smith wrote:
> ok after some playing around i've found the problem lies with using the
> transient window, it grabs focus and won't let go. so i've decieded to
> go with making my own custom frame and drawing my info on it. that way i
> get exactly what i want.
> i'm still stumped on why i can't edit my timectrl's inside the cell
> though...
When the cell editor is created you push a new wx.EvtHandler onto the
widget's event handler chain. This wx.EvtHandler has an event binding
for EVT_KILL_FOCUS such that when the widget loses focus it calls grid
methods that complete the edit session and hide the editor. (It assumes
that if some other widget is getting focus then you are done editing.)
Since your control has child controls, then it loses the focus as soon
as you try to activate the child. So you can avoid this behavior by not
calling PushEventHandler, but you'll also lose the other built-in
functionality of handling the Enter or ESC keys, but you can probably
take care of those yourself without too much hassle.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list