User input/Graphical: Difference between revisions

Line 682:
 
=={{header|M2000 Interpreter}}==
===Simple InputBox===
 
<lang M2000 Interpreter>
Module CheckIt {
Def aName$="No Name", Num$
\\ we open a new stack, and hold old
Stack New {
If Ask$("Give your name:",,,,,aName$)="OK" Then Read aName$
If Ask$("Give a Number: (75000)",,,,,"")="OK" Then Read Num$
if Num$<>"75000" or aName$="" Then loop
}
\ now old stack came back
Print Num$, aName$
Print Letter$ \\ Letter$ pop a string from stack
}
CheckIt "Thank You"
 
</lang
 
===Gui User Form and TextBoxes==
We use two textboxes in a user form. Each one has an event ValidString. The first textbox as we type display the number of characters that we can add. Also remove any leading space.
 
Anonymous user