Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with InputBox() Function
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00755243
Message ID:
00755258
Vues:
13
The help is incorrect. Cancel/ESC always returns empty string. AFAIK, you cannot to distinguish between empty input and Cancel/ESC. You can download rbInputBox File #9714 and adjust it to your requirements.

>Pressing Cancel on the inputbox() function retuns a empty value for me in the following code:
>
>Y = "Default Value"
>Y = INPUTBOX("TypeHere","Input ",Y,5000)
>? Y
>
>According to the VFP documention, by pressing Cancel,Escape, or waiting for the box to timeout, InputBox() should return the default value parameter which in this case should be equal to Y (or "Default Value"). The problem here is that it's impossible to distinguish between when a person actually cleared the value of the textbox and then pressed OK, or if the user hit Cancel. This is important because to me, Cancel means abort any changes to the default value. How can I positively identify when a user is pressing Cancel, or entering a no value into the InputBox?
>
>Thanks
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform