Information générale
Catégorie:
Codage, syntaxe et commandes
Dennis-
>Is there an easy way to exit from a command button. What I would like to do is at the start of the code in a command button check to see if the user has entered the data needed to run the command. If not I just want to exit. Now I run a do case bu if I need to check several pieces of data it gets rather complex.
I have a slightly different take on this problem. Why let the user even click on the Exit button if the data isn't yet valid? This goes along with the idea that our responsibility is to help users make sensible selections and not make mistakes.
So, how to accomplish this depends on the interface, of course. But let's say two bits of information have to be entered before they can exit. You could bind the controls to form properties, and then, in the button's refresh() set the button's enabled to .T. or .F. depending on the values in the properties.
I'd also include a cancel button, if it makes sense for your app, that lets them close w/o having finished everything. You may already do this, but users should always have a way out other than CTL-ALT-Del.
Précédent
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