Databrowser keyboard handling
Publicado: Vie Dic 16, 2005 8:36 pm
Hi,
I would like to modify the navigation behaviour of a TDbfDataBrowser to
allow CTRL-HOME to move to first column and CTRL-END to move to last
column.
This is the code I use and logging all calls to method I found that the
CTRL key is passed but not the HOME neither the END.
METHOD BrowseDataKeyDown( oSender, nKey, nFlags ) CLASS TxNovaTools
SWITCH nKey
CASE VK_HOME // Home
IF ( ( GetAsyncKeyState( VK_CONTROL ) & 1 ) == 1 )
:GoToLeftMost()
RETURN 0
ENDIF
CASE VK_END // End
IF ( ( GetAsyncKeyState( VK_CONTROL ) & 1 ) == 1 )
:GoToRighMost()
RETURN 0
ENDIF
CASE VK_CANCEL // DEL
............
............
END SWITCH
ENDIF
END WITH
RETURN Nil
How can I accomplish this ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
I would like to modify the navigation behaviour of a TDbfDataBrowser to
allow CTRL-HOME to move to first column and CTRL-END to move to last
column.
This is the code I use and logging all calls to method I found that the
CTRL key is passed but not the HOME neither the END.
METHOD BrowseDataKeyDown( oSender, nKey, nFlags ) CLASS TxNovaTools
SWITCH nKey
CASE VK_HOME // Home
IF ( ( GetAsyncKeyState( VK_CONTROL ) & 1 ) == 1 )
:GoToLeftMost()
RETURN 0
ENDIF
CASE VK_END // End
IF ( ( GetAsyncKeyState( VK_CONTROL ) & 1 ) == 1 )
:GoToRighMost()
RETURN 0
ENDIF
CASE VK_CANCEL // DEL
............
............
END SWITCH
ENDIF
END WITH
RETURN Nil
How can I accomplish this ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy