Discussion:
How to trap ctrl-keys entered in a wxGrid cell
Marco DeFreitas
2014-05-13 20:46:41 UTC
Permalink
I am trying to implement a feature where a user can type the start of some
text in a cell and then type "ctrl-e" to expand the remaining text, if it
is known.

If I handle wxEVT_KEY_DOWN on the wxGrid widget, I can catch these
characters if the cell is selected, but not if the cell editor is created
(which it needs to be in order to enter text).

Any idea what I need to do in order to implement this feature?

Thanks,
Marco
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Marco DeFreitas
2014-05-14 14:58:11 UTC
Permalink
Looks like I solved my problem. I had to derive a new editor from
wxGridCellTextEditor and override the Create member function such that the
wxTextControl it uses for editing (m_control) handles the wxEVT_KEY_DOWN
event. I then had to set the cell I wanted to use an instance of my new
editor.
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...