To All
I am trying to trap the down arrow key in an xBrowse .. and this does not work
oLbxB:bKeyDown := { |nKey| MsgInfo(nKey) }
It traps 'Enter', "Insert' .. any ideas ?
Thanks
Rick Lipkin
xBrowse Trap Down Arrow key
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: xBrowse Trap Down Arrow key
XBrowse does not allow this.
You need to write your own KeyDown() method and override and have a derived class.
You need to write your own KeyDown() method and override and have a derived class.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- FranciscoA
- Posts: 1964
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: xBrowse Trap Down Arrow key
Hi Rick.
Do you resolved it?
Can share your solution?
Best regards.
Do you resolved it?
Can share your solution?
Best regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: xBrowse Trap Down Arrow key
I faced this problem this days and solved using bChange.
EMG
EMG
- FranciscoA
- Posts: 1964
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: xBrowse Trap Down Arrow key
Enrico.
Can you post a litle sample?
Thanks
Can you post a litle sample?
Thanks
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: xBrowse Trap Down Arrow key
Here it is:
EMG
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg, oBrw
USE CUSTOMER
DEFINE DIALOG oDlg;
SIZE 800, 600
@ 0, 0 XBROWSE oBrw
oBrw:bChange = { || Test() }
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg;
ON INIT oBrw:AdjClient();
CENTER
CLOSE
RETURN NIL
STATIC FUNCTION TEST()
IF GETKEYSTATE( VK_UP )
? "VK_UP"
ENDIF
IF GETKEYSTATE( VK_DOWN )
? "VK_DOWN"
ENDIF
RETURN NIL
- FranciscoA
- Posts: 1964
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: xBrowse Trap Down Arrow key
Great! Enrico.
Thanks
Thanks
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: xBrowse Trap Down Arrow key
Francisco
Enrico's solution is much better than mine .. I actually modified the xBrowse.prg code ..
Rick Lipkin
Enrico's solution is much better than mine .. I actually modified the xBrowse.prg code ..
Rick Lipkin
- FranciscoA
- Posts: 1964
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: xBrowse Trap Down Arrow key
Rick.
Got it.
Thanks for your kindly.
Got it.
Thanks for your kindly.
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql