InterviewSolution
| 1. |
Solve : Multi-Line Input Box In QuickBASIC? |
|
Answer» I need a way to allow the user to MOVE up, down, left, and right in a text box. I am using QuickBASIC. The QuickBASIC program is an example. This isn't critical but would really be nice. Thanks You don't give very much detail. I am guessing that by "text box" you mean a console window, since you are running "QuickBASIC". Do you mean Microsoft QBASIC or the fuller QuickBASIC programming environment? I am running full QuickBASIC. (I can compile etc.) I want to let the user move the cursor all directions and type text. Well, it should be obvious how to achieve this. Quote from: Fleexy on May 15, 2010, 10:35:20 AM I am running full QuickBASIC. (I can compile etc.) I want to let the user move the cursor all directions and type text. Monitor keypresses in a loop, and if they are arrow keys, do those things that you need to do (update cursor position, check if you have reached the left, top, right, bottom edge, etc), and if they are not arrow keys, do whatever you need to do then (ALPHANUMERIC - print character at cursor position, update the text array where you might be storing input, move cursor position 1 to the right, check for reaching the edge) (esc or whatever - jump out of loop, save data, whatever) Quote from: Salmon Trout on May 15, 2010, 01:37:24 PM Monitor keypresses in a loop, and if they are arrow keys, do those things that you need to do (update cursor position, check if you have reached the left, top, right, bottom edge, etc), and if they are not arrow keys, do whatever you need to do then (alphanumeric - print character at cursor position, update the text array where you might be storing input, move cursor position 1 to the right, check for reaching the edge) (esc or whatever - jump out of loop, save data, whatever) Thanks! |
|