Amos Professional Manual  Contents  Index

Advanced Control Panels


The 'string' parameter enters a string of characters that will be initially loaded into the text edit zone. If a default string is not required, simply use a pair of single quotation marks with nothing in them, or use a zero. Finally, set the colour index numbers for the paper and pen to be used for the characters on screen.

If the size of the string is larger that the physical size of the zone, the string will scroll automatically as more characters are typed in. If the [Return] or [Tab] key is pressed within the edit line, the Interface will jump to the next EDit zone, if it has been defined. When the final zone is reached, all keyboard input will be directed to the dialogue buttons, and the next [Tab] press will return you back to the original editing zone.

When the dialogue box is drawn, the first edit zone of the Interface program will be activated automatically. Please note that order of activity follows the order in which the edit zones were declared in the Interface program, and not the number of the zones.

The contents of an edit zone can be read directly from the main AMOS Professional program, using a simple call to a RDIALOG$ function. Also, if the [Return] key has been pressed, the number of the selected EDit zone will also be available from the DIALOG function.

Characters are entered in a new text zone window with the number z+1000. If the program is to display some text while the zone is in use, the default screen window should be re-activated with a WINDOW 0 instruction. After the text has been displayed, the edit window can be handled by a line like this:

X> Window Z+1000: Rem Z is the number of the EDit zone
Here is a working example of a text input zone:
E> A$=A$+"BA 50,50;SI 200,60; SA 1; set things up"
   A$=A$+"IN 5,0,0; GB 0,0,200,50; PR 16,10,'Enter your name human!',2;"
   A$=A$+"BU 1,150,40,50,10,0,0,16;"
   A$=A$+"[1N BPos 4+,0,0; GB 0,0,50,10; PR 2,0,' Quit',2;][BQ]"
   A$=A$+"ED 2,16,25,14,14,",0,2; define an edit zone"
   A$=A$+"EXit,"
   Dialog Open 1,A$ : Rem Open a channel
   R=Dialog Run(1) : Rem the Interface program
   Repeat
    D=Dialog(1) : Rem Wait until Return Key is pressed
   Until D<0
   Print "Hello ";Rdialog$(1,2)
   Dialog Close

The numerical equivalent of a text zone is examined next.

Back    Next
09.03.06