Information générale
Catégorie:
Codage, syntaxe et commandes
>What's the best way to prevent particular controls losing focus? In FoxPro 2.6, I'd use the VALID snippet & return false if a condition wasn't met, or set the _CUROBJ back to the current objects number.
>
>Is there a different method for the different object types, ie text boxes, combo boxes, etc?
>
>Thanks,
>
> Andy Crawshaw
Do you mean in VFP?
There you can Return .F.
in the valid too.
You can also issue NoDefault
in the LostFocus Event.
It is the same for all objects.
But look out for the Grid.
There the object in the grid loses the focus after in the grid valid event fires.
So you can have that in the control in your grid you don't allow the user to move out the grid, and in the grid you have already allowed it.
You can workaround this by calling the control's valid event in the grid's valid event.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement