Editor
Deprecated. Do not use in new code.
Description | Displays an editor on the screen. |
Returns | Nothing |
Usage | Steady State only. |
Function Groups | Editor, Graphics |
Related to: | AddEditorText | CurrentLine | ForceEvent | GoToOffset | MakeEditor | SetEditMode |
Format | Editor(Left, Bottom, Right, Top, EditorValue, FocusID, Font [, Info]) |
Parameters |
Left | ||||||||||||
Required. Any numeric expression that defines the left hand side of the square area where the editor will operate. | ||||||||||||
Bottom | ||||||||||||
Required. Any numeric expression that defines the bottom of the square area where the editor will operate. | ||||||||||||
Right | ||||||||||||
Required. Any numeric expression that defines the right hand side of the square area where the editor will operate. | ||||||||||||
Top | ||||||||||||
Required. Any numeric expression that defines the top of the square area where the editor will operate. | ||||||||||||
EditorValue | ||||||||||||
Required. An editor value that has been created by MakeEditor which contains the text contents for the editor. | ||||||||||||
FocusID | ||||||||||||
Required. Any numeric expression from 0 to 32767 giving the focus number of the graphic. If FocusID is zero, this graphic cannot receive the input focus. | ||||||||||||
Font | ||||||||||||
Required. Any expression that returns a (fixed pitch) font value. If the font supplied is not fixed pitch, the system font is used. | ||||||||||||
Info | ||||||||||||
Optional. A one-dimensional array where information on the editor will be recorded, as follows: (no default)
|
Comments | If this statement has the focus it will allow you to enter text into the editor. Initial text can be added to the editor by the use of AddEditorText. The text can be read out of the editor by using stream functions. The editor can be forced to do certain actions by the use of ForceEvent. The default key map is as follows
In the case of the optional Info parameter, the variable must be an array. However, it need not have all 5 elements - any information that is normally stored in an element beyond the upper limit of the array will be ignored. |
Example:
myEditor = MakeEditor(); ZBox(10, 110, 210, 10, 1); Editor(10, 110, 210, 10 { Outline of editor }, myEditor { Which editor to use }, 3 { Focus ID }, Font("Courier" { Font name }, 0, 12 { Character set, height in points }, 0 { No rotation }, 7 { Weight (somewhat bold) }, 0, 1 { Not italicized, fixed pitch }) infoArray { Information on the editor });
These statements create an editor that is displayed in a 100 x 200 area of the window in the upper left corner. This and other information will be stored in the array infoArray, whose data will be updated every time that one of the elements' values changes. Notice that the editor has been outlined by a dark blue box, which although not required, makes the boundaries of the editor obvious to the user.