Amos Professional Manual  Contents  Index

Advanced Control Panels


Supposing an automatic jump to a specific page of text is required. The HyperText command would look like this:

X> HText 1,0,0,40,20,text_address,0,4,0,3;
   [ZChange 1,ZPosition]

The entry in the text would -he defined along the following lines:

X> {[10] Goto line 10}
   {[100] Goto line 100}

After the return value has been set up, the paper and pen colours of the button can also be included. If these are not defined, the ink and paper colours will be swapped over when the active highlighted word is displayed on screen. Finally, the word or sentence to be highlighted is given. This can be anything from a single character up to an entire line of text, and it will be displayed at the current cursor position automatically.

The zone definition is now closed with a closing curled bracket.

If an error should occur, or if there are too many button zones on the same line, the zone will be printed in simple Ascii, and the [1 characters will be visible on the screen.

To scroll the window with a slider bar, the number of lines in the current piece of text need to be known. This allows you to set the "total" value to the actual size of the text, and then scroll the text by a single line.

The HyperText instruction places this size in the internal ZoneVariable, so all that needs to be done is define the slider after the text window is opened. For example:

X> SetVar 1,0; variable number one holds the position in the text
   HText 1,0,0,38,20,0 VA,1 VA,10,0,1;[]
   SetVar 2,ZVar; load the number of lines into variable number two
   VSlider 2,38 8*,0,8,20 8*,1 VA,40,2 VA,1; use this to set the total value
   [SetVar 1,ZPos; ZChange 1,1VA:] move hypertext window to new position

If a HyperText window has been defined as a separate screen, it can be physically manipulated using a ScreenMove command.

ScreenMove
Interface instruction: move a screen linked to mouse pointer
SM;

This simple instruction is used to automatically drag the screen when the mouse pointer is moved, and it should be called as part of a [changes] routine to position the screen whenever a particular item is selected. In this final example, a button is set up that generates the scroll bar used by the Help window.

X> BUtton 6,24,0,SX,10,0,0,0;[][ScreenMove;]
Back    Next
09.03.17