hi all,
Is there a way to monitor a keytroke in a tget object? Similar to bkeydown in dialogs.
Thanks!
monitoring key stroke inside tget object.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Hi antonio,
oCtrl := tGet():New(.....)
oCtrl:oGet:Name="some name"
msginfo(oCtrl:oGet:Name) <---- it is okay to this code
oCtrl:oGet:bKeyDown :={|nkey,nflags|ls_keyd2(nkey,nflags)} <-- getting an no method get: _bkeydown
Thank you very much.
Jose
Here's actual code:
oCtrl := tGet():New(edRow*REDUCE*13,;
((if(edCol==1,1,40)+nMaxLen-1)*4)-nWidth,;
bField,oDlg,nWidth,10,edPic,;
if(edVal==NIL,NIL, &( "{|self|" +edVal +"}" ) ),;
,,oFont,.f.,,.t.,edFld,.t.,if(edPmt=" ",{||.f.},{||.t.}),;
.f.,valtype(eval(bField))="N",,.f.,lEncrypted)
oCtrl:oGet:Name := edFld
****************** // jdd
*oCtrl:oGet:reader :={|oGet|ls_trapKey(oGet)}
*aadd(memvar->xoctrl,oCtrl)
*msginfo(valtype(memvar->xoctrl))
msginfo(oCtrl:oGet:Name)
oCtrl:oGet:bKeyDown :={|nkey,nflags|ls_keyd2(nkey,nflags)} // jdd
msginfo(valtype(oCtrl:oGet:bKeyDown))
********************* // jdd
oCtrl := tGet():New(.....)
oCtrl:oGet:Name="some name"
msginfo(oCtrl:oGet:Name) <---- it is okay to this code
oCtrl:oGet:bKeyDown :={|nkey,nflags|ls_keyd2(nkey,nflags)} <-- getting an no method get: _bkeydown
Thank you very much.
Jose
Here's actual code:
oCtrl := tGet():New(edRow*REDUCE*13,;
((if(edCol==1,1,40)+nMaxLen-1)*4)-nWidth,;
bField,oDlg,nWidth,10,edPic,;
if(edVal==NIL,NIL, &( "{|self|" +edVal +"}" ) ),;
,,oFont,.f.,,.t.,edFld,.t.,if(edPmt=" ",{||.f.},{||.t.}),;
.f.,valtype(eval(bField))="N",,.f.,lEncrypted)
oCtrl:oGet:Name := edFld
****************** // jdd
*oCtrl:oGet:reader :={|oGet|ls_trapKey(oGet)}
*aadd(memvar->xoctrl,oCtrl)
*msginfo(valtype(memvar->xoctrl))
msginfo(oCtrl:oGet:Name)
oCtrl:oGet:bKeyDown :={|nkey,nflags|ls_keyd2(nkey,nflags)} // jdd
msginfo(valtype(oCtrl:oGet:bKeyDown))
********************* // jdd
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: