Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tab Exit From Grid
Message
De
14/07/1999 21:23:07
 
 
À
14/07/1999 15:09:37
Timothy Enright
Coos Bay Public Schools
Coos Bay, Oregon, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00241382
Message ID:
00241616
Vues:
16
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform