>Tab/ShiftTab in grid move between columns normally. Ctrl+Tab or Ctrl+Shift+Tab sets focus to next or prev. control. You could control it in form.keypress event w/o a need to add code to each column.textbox.keypress.
>
>thisform.keypreview = .t.
>* Grid.valid
>thisform.keypreview = .f.
>
>*Form.keypress
>LPARAMETERS nKeyCode, nShiftAltCtrl
>if nKeyCode = 9
> nodefault
> keyboard "{Ctrl+TAB}"
>endif
>if nKeyCode = 15 and nShiftAltCtrl = 1
> nodefault
> keyboard "{Ctrl+BACKTAB}"
>endif
Also there is another way free from keypress event (if you would create a grid class). In ARCC check lastkey() (9 or 15) and setfocus() to another control other than grid.
>Cetin
Thanks a lot
I did exactly this. But the problem< I like my code will work in class
for does not matter how many columns in the grid, and how many grids in the form
and work if the cointrol is not grid
Never the less will try one again.
Best wishes, Vladimir
MVP-2006-2011, PHD in Math and Physics ,
host of
www.foxclub.ru,
VFP lector at Interface and Microinform companies
Head science researcher of VNIIA Rosatom.