Se trata de ir inmediatamente a la col deseada segun su posicion. Manteniendo presionada tecla CTRL se digia el No. de columna y... zas.
- Code: Select all Expand view
- #include.....
Static nLapsus, cBusq
Function main()
GetData()
Return
function GetData()
nLapsus := Seconds(); cBusq:=""
define dialog.....
redefine oBrw....
....
....
oBrw:bKeyDown:= {|nKey| if(cValToChar(nKey) $ "96;97;98;99;100;101;102;103;104;105" .and. GetKeyState(VK_CONTROL), SeekCol(nKey,oBrw) ,) }
Return nil
//------------------------//
Function SeekCol(nKey,oBrw)
local cChar, nColBusc:=0,n
local aNKeys:={96,97,98,99,100,101,102,103,104,105,107,109,110}
local aChrNKeys:={"0","1","2","3","4","5","6","7","8","9","+","-","."}
If ( Seconds() - nLapsus ) > 2 .or. ( Seconds() - nLapsus ) < 0
cBusq := ""
EndIf
nLapsus := Seconds()
if Ascan(aNKeys,nKey) != 0
cChar:=aChrNKeys[Ascan(aNKeys,nKey)]
cBusq+= cChar
else
cBusq+= Upper(Chr(nKey))
endif
nColBusc := Val(cBusq)
oBrw:GoLeftMost() //col 1
For n:=1 to nColBusc -1
oBrw:GoRight()
Next
oBrw:Refresh()
Return nil