HP Forums

Full Version: Input Box
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to write output to a text box that was used for input?

All the text in the input box can be programatically generated.
The default values for the various fields can also be progrmatically generated.

This should allow you to "write some output to an input text box".

Assuming that I understood what you were asking correctly.

If you want to dynamically change the values in an input box (like some of the system input boxes), unfortunately, this is not possible with the user level function.

Can you provide me with a simple code to do this?
I am trying to create an app like the triangle solver that has input boxes and displays the results in the same input boxes that were not enter with data.

Also can you hide or make not visible an input box?
There is now way to control a displayed INPUT box, BUT I often use it in a loop to show the result below the fields, like that:


LOCAL ret;
  ret := INPUT(A, B, C);
  IF ret <> 0 THEN
    C := A+B;
UNTIL ret = 0;

Each time you click "Ok" the result is updated, if you click "Cancel" the box is closed.
Check the program "DistSpeedTime" In the Prime Software section. The program uses that technique you may be looking for. Made by yours truly.

Note: The INPUT vars other than A to Z are declared with EXPORT rather than LOCAL. Check line 4. Line 68 in the first section causes the return to line 31, and the values are returned to the input boxes since the vars are Global. This is necessary to cause the effect you are looking for. The vars A to Z need not be declared since they are Global vars. Lower case a to z can be declared with LOCAL, when they are not used as an INPUT label .

Reference URL's