>One of my users wants tabstop did not work inside the grid.
>Pressing the tab button should set focus on the some element on the form , different from the grid. Tabs should not set focus on other column. Only arrows buttons should work inside the grid for row/column change
>I set tabstop of all text controls inside the grid to .f.
>It did not help. Pressing tab set focus on the next column in the grid.
>I had success only writing some code at all grid text controls
>in keypress or lostfocus event
>Is it less bludy way to solve this small problem, Could I miss some grid ( column, text ) propert , which help to solve this small problem
>Thanks in advance, Vladimir Zhuravlev
Vladimir,
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.
thisform.keypreview = .f.
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