Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forcing users to move one direction only in a grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01124152
Message ID:
01124153
Vues:
14
Well, I suppose you could put something in the Keypress method, to kill the Tab key or whatever key you need to kill. The code might look like this:
if nKeyCode = 9  && Tab key
   nodefault
endif
But what about when they fill the field? VFP will automatically move to the next column and will wrap around, so the above code would not work. And if they drag the columns around and reposition them, that's going to add to the problem.

Interesting question - don't think I've ever needed to do this before.

Out of curiosity, why are you wanting to do this? The wrap around feature of VFP grids (and the browse) are prety handy, usually.

>Hi all,
>
>I've got a grid on an order entry form to handle the order's detail lines. Let's say there are five columns in the grid. I want to prevent them from wrapping around (moving from column 1 to column 5, or moving from column 5 to column 1). I want them to have to move to the right from column 1 and to the left from column 5. I'm assuming I'd have to put something in the Valid method for each of those columns (correct?), but what? Something to block tab/shift-tab or the right-arrow/left-arrow? How do I prevent users from leaving a grid column in certain directions, or force them to leave in the direction I choose?
>
>Thanks much!
>
>John
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform