xbrowse
Posted: Wed Jul 31, 2013 11:23 pm
colleagues there any command to display columns that are not visible without having to use the right arrow
thank you
Luiz Fernando
thank you
Luiz Fernando
Code: Select all
oBrw:bKeyDown:= {|nKey| if(cValToChar(nKey) $ "96;97;98;99;100;101;102;103;104;105" .and. GetKeyState(VK_CONTROL), SeekCol(nKey,oBrw) ,) }
//-----------------------------
FUNCTION SeekCol(nKey,oBrw)
local n, nCol
local aKeys:={96,97,98,99,100,101,102,103,104,105}
local aChrKeys:={"0","1","2","3","4","5","6","7","8","9"}
nCol:=aChrKeys[Ascan(aKeys,nKey)]
nCol:=Val(nCol)-1
oBrw:GoLeftMost()
For n:=1 to nCol
oBrw:GoRight()
Next
oBrw:Refresh()
Return nil
Code: Select all
oBrw:nColOffSet := oBrw:LastDisplayPos( .t. ) + 1
oBrw:Refresh()
Code: Select all
#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) ,) }
oDlg:End()
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