Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tab Exit From Grid
Message
From
14/07/1999 21:23:07
 
 
To
14/07/1999 15:09:37
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00241382
Message ID:
00241616
Views:
11
>Sylvain,
>
>Thanks again for the post! That's what I was looking for - one problem, I can't seem to clear the TAB character from the typeahead buffer. When I set focus to the treeview the TAB places me back in the grid. Ideas...
>
>...tim




set the form.keypreview to .T.

* Form.KeyPress()
Lparameters nKeyCode, nShiftCtlAlt

Do case
case nKeyCode = 9 && Tab

  DO case
  case Thisform.ActiveControl.Name = "GrdWithTree"
    do case
    case Thisform.GrdWithTree.ActiveColumn = 2
    * The Tree Column
      Thisform.GrdWithTree.Columns[3].Setfocus()
    case Thisform.GrdWithTree.ActiveColumn = Thisform.GrdWithTree.ColumCount
    * Last Column
      Thisform.NextControl.Setfocus
    Endcase && ActiveColumn
  EndCase && ActiveControl

case nKeyCode = 15 && Shift+Tab
  DO case
  case Thisform.ActiveControl.Name = "GrdWithTree"
    do case
    case Thisform.GrdWithTree.ActiveColumn = 2
    * The Tree Column
      Thisform.GrdWithTree.Columns[1].Setfocus()
    case Thisform.GrdWithTree.ActiveColumn = 1
    * First Column
      Thisform.PreviousControl.Setfocus
    Endcase && ActiveColumn
  EndCase && ActiveControl

EndCase && nKeyCode


Good Luck! ^__~
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform