Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tabstop in grid
Message
From
25/10/1999 08:27:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/10/1999 03:11:49
Vladimir Zhuravlev
Institute of the Physics of Earth,Russia
Moscow Region, Russia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00280869
Message ID:
00280889
Views:
11
>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.
* Grid.when
thisform.keypreview = .t.
* Grid.valid
thisform.keypreview = .f.

*Form.keypress
LPARAMETERS nKeyCode, nShiftAltCtrl
if nKeyCode = 9 && Tab
  nodefault
  keyboard "{Ctrl+TAB}"
endif
if nKeyCode = 15 and nShiftAltCtrl = 1 && Backtab
  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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform