Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Column
Message
De
09/03/1999 01:44:28
 
 
À
09/03/1999 00:26:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Column
Divers
Thread ID:
00195446
Message ID:
00195447
Vues:
22
>HI,
>
>i have a Grid in my form, there have 5 column in it.
>the first column is "A/C no.", and the second is "A/C Desc.".
>the 3rd is "Amount".
>But the "A/C Desc." is no need to input the data.
>
>How can i jump to "Amount" column, after i press ENTER or TAB at "A/C no." column.



I suggest you to re-arange the column order, so that no need to add any coding
to Next Input place. Since user will feel poor if the cursor jump out of his/her expectation!!




To do this, there are serveral methods:
* case 1: Thisform.KeyPress() and set KeyPreview to True
Lparameters nKeyCode, nShiftCtrlAlt
Do case
case nKeyCode = 13 or nKeyCode = 9 && [Enter] & [Tab]
  if thisform.activeControl.name = [Thisform.grid1.name]
     if thisform.grid1.activecolumn = 1 && First Column
        ThisForm.grid1.column3.text1.setfocus()
     endif
  endif
EndCase

* Pons: Sure work, less bugs or unexpected event occur.
* Cons: Program need to can every time when user press a key.

* case 2: Thisform.grid1.column.text1.KeyPress()
Lparameters nKeyCode, nShiftCtrlAlt
if nKeyCode = 13 or nKeyCode = 9 && [Enter] & [Tab]
  thisform.grid1.column3.setfocus() && or .text1.setfocus()
endif

* Pons: only run this event when on that text events.
* Cons: In most cases, you may add coding on textbox.Keypress(), 
*       or you may add validation check and lock back to same control...
*       Thus, there may make unexpected result and situation.



Anyway, who can catch the mice is a good cat! >^.^<
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