Tengo el problema de controlar las teclas pulsadas en un diálogo desde recursos.
Quiero controlar ESC, RETURN y alguna más.
Para empezar no me captura ninguna y al pulsar ESCAPE, se cierra el diálogo.
Code: Select all | Expand
SetDialogEsc(.F.)
DEFINE DIALOG ::oDlg RESOURCE "FAMILIAS" FONT ::ofont COLOR CLR_BLACK, CLR_WHITE TRANSPARENT
WITH OBJECT ::oTreeFamilias := TTreeView():REDEFINE(102, ::oDlg,CLR_BLACK,CLR_GREEN , .F. ,"" )
:setColor( CLR_HBLUE, CLR_WHITE )
:setFont(::oFontTree)
:bEraseBkGnd = { || nil } // Soluciona el fallo con Diálogos TRANSPARENT
END
......
::oDlg:bKeyChar := {|nkey| msginfo(nKey) }
::oDlg:bKeyDown := {|nkey| msginfo(nKey) }
ACTIVATE DIALOG ::oDlg CENTERED ON INIT ( oSelf:creaBarBtnsSelect(), oSelf:loadTree() )
Ni muestra ninguna tecla, pulse la que pulse y se sale, ignorando SetDialogEsc(.F.)
No lo entiendo. ¿Tan dificil es que me funcione bkeydown o hay que hacer algo que se me escapa?