wxGrid and Focus Event

Paul McNett p at ulmcnett.com
Tue Nov 29 15:37:41 EST 2005


lux wrote:
> Can you try this code?

Sure, thanks for posting it!


> If you press only the TAB key
> the focus go from the TextCtrl to the Grid (I suppose)
> but onGridFocus in not called.

Confirmed, at least on Gtk.


> any idea?

Yep, the grid is actually a collection of subwindows, and I made the guess that 
the first window to get the focus is actually that little corner window at the 
intersection of the column labels and the row labels. Try this instead:

>>> g.GetGridCornerLabelWindow().Bind(wx.EVT_SET_FOCUS, onGridFocus)


-- 
Paul McNett
http://paulmcnett.com
http://dabodev.com




More information about the Python-list mailing list