Mike Driscoll wrote:
> Hi,
>
> I have a wx.Grid that I'm using for as a spreadsheet in
one of my
> applications. I would like to override the grid cell
editor's arrow key
> navigation so that when I press one of the keys, it
will navigate away
> from the cell I am currently editing, like MS Excel
does. While I can
> successfully catch the keycodes for the buttons when I
am not editing a
> cell, they seem to get eaten once I actually activate
the editor. Is there
> a way to do this?
Keep in mind that when the cell editor is shown that there
is another
widget there, and so the grid itself doses not have the
keyboard focus
anymore, and so it will not be getting the key events. You
can however
bind your own key handler to the cell editor widget and take
care of
things there. Bind a handler for the
EVT_GRID_EDITOR_CREATED event and
in the handler you can use event.GetControl() to get a
reference to the
widget.
>
> Also, one of my users asked if I could put pop-up
tooltips on the column
> name when moused over. I can't find anything about
mouse-over events.
You can intercept the mouse events for the
theGrid.GetGridColLabelWindow() and show a tip window if you
sense that
the mouse is hovering. Be sure to call event.Skip() so the
default
event handlers in the grid will still be called.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java
give you jitters? Relax with wxPython!
------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribe lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help lists.wxwidgets.org
|