Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with InputBox() Function
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00755243
Message ID:
00755258
Views:
9
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform