Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locking current grid row
Message
De
31/10/1998 03:41:35
 
 
À
29/10/1998 04:00:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00152154
Message ID:
00153137
Vues:
18
You have to use a combination of the BeforeRowColChange (BRCC) and the TextBox.When events and some variables (Form's User-defined properties)

I've noticed that there's no way of preventing the record pointers from changing unless you use a NODEFAULT in BRCC. Then, even programmatically, the record pointer stays. However, NODEFAULT in BRCC alone won't help much.

The idea is to track the record pointers. A RecNo() in BRCC (or TextBox.Valid for that purpose) gives you the pointer before it changes. The RecNo() in the When event gives you the pointer after it changes. Here, you can programmatically do a GO RECORD liOldRecPtr to revert the action.

This works well if your intention is to prevent the user from clicking or moving onto another row. Notice though, that this does not prevent the record pointer from actually changing. It just reverts the change.

You can use THISFORM.LockScreen for smoother transitions, and another variable to turn this row-freezing on/off.

E-mail me at kensoft@tm.net.my if you need a sample form.

Regards Kenneth
Kenneth.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform