there is a problem with the xbrowse (fwh april 2009) using lFastEdit=.t.
With a previous xbrowse version I used lFastedit=.t. and oBrw:GoDown to go to the next cell.
Now, using lFastEdit=.t. the control automatically go to the next cell but if the array is more lenght then the xbrowse window then when I am on the last visible cell, pressing enter the control remain on that cell instead to go to the next cell scrolling the browse.
This is a self-contained sample that show the problem.
Try to change the numeric values and press enter each time. You will see that at the end of the xbrowse windows the fastedit terminate always on the last visible cell instead to scroll the xbrowse and go to the next cell.
Any solution ?
Thanks in advance.
- Code: Select all Expand view
- #include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oDlg, oBrw, aArray
* set century off
set epoch to 1920
aArray:={}
aadd(aArray,{"Marc",10.2})
aadd(aArray,{"Luca",6.5})
aadd(aArray,{"James",11.3})
aadd(aArray,{"Christine",1.3})
aadd(aArray,{"Melanie",15.3})
aadd(aArray,{"Robert",14.3})
aadd(aArray,{"Jimmy",13.3})
aadd(aArray,{"Enrico",10.3})
aadd(aArray,{"Mario",12.3})
aadd(aArray,{"Pinco",13.3})
aadd(aArray,{"Eric",14.3})
DEFINE DIALOG oDlg SIZE 300, 200
@0,0 XBROWSE oBrw OF oDlg ARRAY aArray AUTOCOLS
oBrw:aCols[2]:cEditPicture := "@E 999.99"
oBrw:aCols[2]:nEditType := 1
oBrw:aCols[2]:bOnPostEdit := {|o,x| nLastCell:=oBrw:nArrayAt,aArray[oBrw:nArrayAt,2]:=x}
oBrw:lFastEdit:=.t.
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTER
return nil