>Is there a function to produce an InputBox similar to the MessageBox() and the VB InputBox functions? I want the user
>to enter a value in a text box and then pass this value to
>a routine. I could simply create a form, but we all know that
>more functionality would be added. I just want a simple title,
>label, textbox and a button. Any thought would be appreciated,
>Joe.
There is no native function for this.
I have created a modal form for this purpose though, and I use it everywhere. It receives two optional parameters: A caption for the label on the form and an input mask for the text box. The form returns whatever value the user entered.
So I call the form with
DO FORM Gettext WITH "Enter a telephone number:","999-999-9999" TO lcTel
In the init of the form, I check to see if a caption was passed, and if so, set the labels caption property to the passed caption. I then check to see if an inputmask was passed, and set the textbox's inputmask to this parameter. You could go even further by allowing for numeric only (spinner) input or have the textbox and form dynamically size itself according to the caption and inputmask.
Erik Moore
Clientelligence