To All
I am trying to trap the down arrow key in xbrowse .. I noticed in vkeys.ch there is not a value for the down arrow key.
When I use this function oLbxB:bKeyDown := { |nKey| _Manual( nKey,oRsDetail,oLbxB )} .. the function Manual does not return a value for nKey when the down arrow key is pressed.
I realize the arrow keys may be reserved, but is there a work around for trapping the down arrow key ?
Thanks
Rick Lipkin
Trapping down arrow with bKeyDown
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
-
- Posts: 55
- Joined: Fri Jul 08, 2011 6:43 am
Re: Trapping down arrow with bKeyDown
Rick ,
If you have the intention to trap changing from row , you can use bChange as :
oBrw:lColChangeNotify := .T.
oBrw:bChange := {|oBrw,lRow|MyFunc(oBrw,lRow,@GehRec)}
MyFunc(oBrw,lRow,Gehrec)
**********************************
IF lRow is .T. , there was a changing from row.
To know if it was the down or up arrow , you could check the procedure list (procnames(....))
FRank
If you have the intention to trap changing from row , you can use bChange as :
oBrw:lColChangeNotify := .T.
oBrw:bChange := {|oBrw,lRow|MyFunc(oBrw,lRow,@GehRec)}
MyFunc(oBrw,lRow,Gehrec)
**********************************
IF lRow is .T. , there was a changing from row.
To know if it was the down or up arrow , you could check the procedure list (procnames(....))
FRank
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Trapping down arrow with bKeyDown
Frank
I am trying to re-create a VB application that needs a modern facelift. My goal is to duplicate the functionality of the application. In this case when the down arrow is used it navigates through the grid as xBrowse .. however when the arrow down is used on the last row, the grid appends a new record allowing for data entry to continue.
I was hoping to be able to trap the down arrow key and test for eof to be able to append a new row. This is a very desirable function in this program and one I would like to preserve.
I will study your suggestion and I appreciate your help!
Thanks
Rick
I am trying to re-create a VB application that needs a modern facelift. My goal is to duplicate the functionality of the application. In this case when the down arrow is used it navigates through the grid as xBrowse .. however when the arrow down is used on the last row, the grid appends a new record allowing for data entry to continue.
I was hoping to be able to trap the down arrow key and test for eof to be able to append a new row. This is a very desirable function in this program and one I would like to preserve.
I will study your suggestion and I appreciate your help!
Thanks
Rick
- FranciscoA
- Posts: 1964
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: Trapping down arrow with bKeyDown
Rick.
In my Fwxh ver 10.06 I can do as follow. Maybe, is what you are looking for?
oBrw:bPastEof = {|| If(MsgNoYes("Do you want to add a new record?","Add a new record"),;
(oServer:Query("INSERT INTO " + cAlias + " () VALUES() ;"),;
oAlias:Refresh(),oBrw:GoBottom(), oBrw:GoLeftMost(), oBrw:Refresh()),) }
Regards.
In my Fwxh ver 10.06 I can do as follow. Maybe, is what you are looking for?
oBrw:bPastEof = {|| If(MsgNoYes("Do you want to add a new record?","Add a new record"),;
(oServer:Query("INSERT INTO " + cAlias + " () VALUES() ;"),;
oAlias:Refresh(),oBrw:GoBottom(), oBrw:GoLeftMost(), oBrw:Refresh()),) }
Regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Trapping down arrow with bKeyDown
Mr Rick
oBrw:bPastEof is intended for this purpose.
You can implement this with oBrw:bPastEof and oRs:AddNew()
oBrw:bPastEof is intended for this purpose.
You can implement this with oBrw:bPastEof and oRs:AddNew()
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Trapping down arrow with bKeyDown
Francisco, Rao
Thank you both !
Rick
Thank you both !
Rick