xBrowse Trap Down Arrow key

xBrowse Trap Down Arrow key

Postby Rick Lipkin » Thu Apr 30, 2015 9:56 pm

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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: xBrowse Trap Down Arrow key

Postby nageswaragunupudi » Fri May 01, 2015 2:24 am

XBrowse does not allow this.
You need to write your own KeyDown() method and override and have a derived class.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10622
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Trap Down Arrow key

Postby FranciscoA » Wed Oct 21, 2020 5:46 pm

Hi Rick.
Do you resolved it?
Can share your solution?

Best regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: xBrowse Trap Down Arrow key

Postby Enrico Maria Giordano » Wed Oct 21, 2020 5:52 pm

I faced this problem this days and solved using bChange.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xBrowse Trap Down Arrow key

Postby FranciscoA » Wed Oct 21, 2020 5:56 pm

Enrico.
Can you post a litle sample?
Thanks
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: xBrowse Trap Down Arrow key

Postby Enrico Maria Giordano » Wed Oct 21, 2020 7:26 pm

Here it is:

Code: Select all  Expand view
#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


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xBrowse Trap Down Arrow key

Postby FranciscoA » Wed Oct 21, 2020 8:26 pm

Great! Enrico.
Thanks
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: xBrowse Trap Down Arrow key

Postby Rick Lipkin » Wed Oct 21, 2020 8:36 pm

Francisco

Enrico's solution is much better than mine .. I actually modified the xBrowse.prg code ..

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: xBrowse Trap Down Arrow key

Postby FranciscoA » Wed Oct 21, 2020 9:44 pm

Rick.
Got it.
Thanks for your kindly.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests