>
> I have not checked out your bug but; do U have to use the Valid method? How about LostFocus?
Yes. We kind of like the sound of valid as opposed to LostFocus I
guess.
Not sure it makes a lot of sense but I have used the following approach
that does work from the Valid event, but not from within grids!
***
*** -----------------------------------
***
procedure tabIndexDiff(xTo,xFrom)
* Use in valid clauses to focus another field than the
* natural next one.
* xTo is the object you want to focus, xFrom is the
* current object.
*! Does not work in grids because the tabindex is always 1.
*? tired of not knowing when setfocus works and when not.
if !propIsMember(xTo,'TabIndex')
return 1
endif
if !propIsMember(xFrom,'TabIndex')
return 1
endif
return xTo.tabindex-xFrom.tabindex
***
*** ---------------------------------
***
procedure propIsMember(xObj,xProp)
local array xAr(1)
local xNr,xI
xNr=amember(xAr,xObj)
if xNr=0
return .f.
endif
for xI= 1 to xNr
if upper(xAr(xI))= upper(xProp)
return
endif
endfor
return .f
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.