Loading...
 

Text

Text

Text(name~aliasName, flags, x, y, w, h)

Parameters Description
name * Identifier or CLASS::expr
aliasName an additional identifier
flags Flags
x * Position X (in minicells)
y * Position Y (in Minicells)
w * Width (in minicells)
h * Height (in minicells)
  • - Required parameter

The tuple (class, access expression) defines an image on model data (see FillWindow, DrainWindow).

Attention:
If a text that is to be displayed in a text box does not appear in its entirety, the text to be displayed may be larger than the buffer that a text box allocates by default. The standard limit of a text field is 5000 characters. With the command SetBufSize the buffer can be increased.

Note:

You can transform this widget to a Rich Text Editor in MorphIT, for this it is sufficient that the MorphIT slot description gets the value richtext.

Flags
Flag Description
HIDDEN The window object is invisible until the Show command makes it appear on the screen.
VIEW_ONLY The input field can only display data, but you cannot enter characters interactively.
LOCKED The widget is locked. This state can be unlocked by Unlock.
NON_SELECTABLE You can neither select the input field with the mouse nor with the keyboard and therefore cannot enter any characters. Data is displayed in grey.
JUSTIFY_RIGHT The entered character string appears right-justified in the input field.
JUSTIFY_CENTER The entered character string appears centred in the input field.
FONT(k) k = 0, 1, ..., 9 selects an entry in the font table. The font entered there is used. Fonts are entered into the table with PMFonts. Predefined fonts exist for 0, 1 and 2. The font index can be changed later with SetFont.
MIN_HEIGHT(h) The height of the widget never falls below the value h (specified in minicells). This is especially useful in combination with attachments.
MIN_WIDTH(w) Width of the widget never falls below the value w (specified in minicells). This is especially useful in combination with attachments.
NO_DRAIN The input field is filled by FillWindow, but ignored by DrainWindow.
NO_CLEAR ClearWindow does not delete the input field.
TOOLTIP(mlString) The specified string is displayed as a tooltip or, if an event TOOLTIP is also defined, is passed to it. The tooltip is automatically triggered by the system after a certain period of time when the mouse cursor remains over the window object. The string can be multilingual. The current language is passed to the event.
CONTEXTMENU(identifier) The identifier is an identifier of an item within a Menu or ContextMenuList declaration. The submenu hanging under this item is shown automatically when the right mouse button is pressed. If thereupon a menu item is selected the respective action is started as described for item, in the same way as if the menu item had been called from the main menu.
Additionally you can get the menu item via ContextMenu from which window object the menu item was called via ContextMenu when you execute SELECT for the corresponding item with GetCurrentWidget. With a call from the main menu GetCurrentWidget returns NULL.

If a ContextMenu should not appear automatically, then it can be called (according to design guidelines this should be done as reaction to the right mouse button, thus within MOUSE_CLICK_R ) by means of PopupMenu also from InstantView®. In this case you should not use the CONTEXTMENU flag, otherwise the menu will appear twice (once automatically, once controlled).

VOLATILE, VOLATILE(identifier) The input field should only be visible if the date to be displayed also exists, otherwise it is automatically hidden by FillWindow. When is data missing in an object? This is the case
  • if a slot does not exist in the object
  • if a pointer in the access path has the value NULL
  • if a function in the access path returns NULL.
  • when accessing the k-th element of a collection with cardinality < k

For example, a function can be used to decide at any point in the access imprint whether it should be followed up or not. Often other window objects - e.g. the prompt belonging to the input field - should also be shown and hidden. For these objects, the VOLATILE flag is specified with the same identifier, which here identifies a group of logically related window objects.
If a window object refers directly to a 'normal' data member of a model object, flag VOLATILE is meaningless and without function.

DYNAMIC_POSITIONING Size and position of the window object are not determined by its coordinates but by the parent window. The window object occupies the entire client area of its parent window and adapts to it when the size of the window is changed interactively.
HELP(anchor) Help("file#anchor") connects the window object with online help in HTML format. If no file name is specified, the HTML file specified in the module applies.
HELP(s) If you prefer to use the platform's help system (OS/2 PM, MS Windows), enter an integer n which refers to the corresponding help window. Where n must be < 40000.

Note: HTML is recommended as the online help for InstantView® application for portability reasons.