Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validation in conjunction with navigation toolbar in VFP
Message
De
30/11/1999 01:55:54
 
 
À
29/11/1999 13:29:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00294748
Message ID:
00296743
Vues:
34
>>>
>>>... The problem is that toolbars don't receive focus, and so they don't cause other controls to lose focus. ...
>>
>>
>>Tangent: Can you make other buttons behave the same way? Can you place a button on a form and have it behave so that when the button is pressed the active control on the form does not lose focus?
>
>Not that I know of. You can prevent a control from receiving focus by returning .F. from the When event, but this also prevents its click functionality from running.

You can't have this as a built in behavior but you can acomplish the same effect
this can be done by having the controls set some property on the form with a reference to itself and having the button SetFocus back to the control pointed by the property at the end of the click event

The problem is then with validation of the textbox - but you can solve this if you move the code from valid to lostfocus
the new control When event occurs before the lostfocus of the old control, thus you can (for example)_set some property that will tell the lostfocus event to skip validation if the new control is such a button

Arnon
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform