[C con Clase] sobre wwiwidgets y keyevent
Mariano D'Agostino
dagostino.m en gmail.com
Dom Nov 25 19:25:02 CET 2007
Hola Pedro:
En la pagina de wxWiki indican como capturar cuando se presiona la
tecla enter: (http://www.wxwidgets.org/wiki/index.php/WxGrid)
copio a continuacion lo que dice:
--------------
Catching WXK_RETURN from the cell editor
The cell editor sends WXK_RETURN and WXK_NUMPAD_ENTER events to the
grid. To catch these, you'll have to dynamically connect a handler
function to the event handler of the grid, using the static event
table doesn't work.
grid->GetEventHandler()->Connect(wxEVT_KEY_DOWN,
wxKeyEventHandler(MainFrame::OnGridKeyDown));
void MainFrame::OnGridKeyDown(wxKeyEvent& event)
{
if (event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() ==
WXK_NUMPAD_ENTER)
{
cout << "return pressed" << endl;
}
event.Skip();
}
------------
Cambiando WXK_RETURN por la tecla que te interese creo que puede servir.
Saludos
Mariano D'Agostino
El 25/11/07, Pedro Mateo <pedromateoa en gmail.com> escribió:
> hola
> necesito capturar eventos de teclado en el wxgrid
>
> gracias anticipadas
>
>
> _______________________________________________
> Lista de correo Cconclase Cconclase en listas.conclase.net
> http://listas.conclase.net/mailman/listinfo/cconclase_listas.conclase.net
> Bajas: http://listas.conclase.net/index.php?gid=2&mnu=FAQ
>
Más información sobre la lista de distribución Cconclase