tell if gridevent (wx.EVT_GRID_SELECT_CELL) originated from user
Eric Ongerth
ericongerth at gmail.com
Sun Jun 3 17:49:56 PDT 2007
Let's say I have a grid event (wx.EVT_GRID_SELECT_CELL) and I want to
determine whether it came from the keyboard (i.e. was initiated by the user)
or not.
Why am I asking? Well, most of the time if such an event passes by, it IS
because the user selected a cell. However, if I clear my grid table (this
is with a wx.PyGridTableBase) and then add a single row back into it, notify
the grid of the change and refresh the grid, the grid seems to say "hey,
there's only one row in me. It must be the selected row!" -- thus it
generates a wx.EVT_GRID_SELECT_CELL.
Unfortunately, I'm binding EVT_GRID_SELECT_CELL to a method that populates a
bunch of fields in a window, and I don't want those fields populated
automatically if the above chain of events happened. I only want it
populated if the user actually selected a cell, not by the "default select"
of the table having only one row.
I thought I'd read that there was a general method inherited from the
abstract wx.Event class that returns the value I want, but it doesn't seem
to be there as such. Maybe I was just thinking of IsCommandEvent, which
doesn't appear to be what is needed here.
Thanks for any ideas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200706=
03/06103e3a/attachment.htm
More information about the wxpython-users
mailing list