Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'on key' events seem to have priority over valid method.
Message
De
16/11/2001 12:47:00
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
16/11/2001 00:21:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00582463
Message ID:
00582811
Vues:
29
>David,
>
>Here's an untested idea ...
>
>Have the function called from your 'on key label' code set a form property called (for instance) .PageTurn with a value of 1 if PageUp or 2 if PageDn, i.e.
>
>on key label Pgup do PageTurn with 1
>on key label Pgdn do PageTurn with 2
>
>function PageTurn( pnDirection )
>* remember which direction user wanted to move
>_Screen.ActiveForm.PageTurn = pnDirection
>* force a valid event without moving user out of current control
>keyboard {Ctrl+W} plain
>endfunc
>
>In your valid code, make a local copy of the form's .PageTurn property and then reset this property to 0. If the valid() is successful, 'move' in the specified direction as specified by the local copy of the form's .PageTurn property. If the valid fails, remain in the control so the user can resolve the problem.
>
>If this works, I would be curious to see what your final code looks like.

Even easier - the .PageTurn property could have an Assign method, so it would react immediately, and it could also check to see if it's allowed to react now or should it wait.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform