Loading...
 

Prompt

Prompt

Prompt(name~aliasName, flags, x, y, w, text)

Parameters
Parameters Description
name Identifier - Convention: Ends by convention with Pmt
aliasName an additional identifier
flags Flags
x * Position X (in minicells)
y * Position Y (in Minicells)
w Width (in minicells)
text Text as string or (multilingual) as multiple string constant
  • - Required parameter


A prompt is used to display a text, which is displayed directly without a frame or similar and cannot be edited by the user.

Flags
Flag Description
HIDDEN The prompt remains invisible until instruction Show makes it appear on the screen.
NO_DRAIN The text of the prompt is filled by FillWindow, but ignored by DrainWindow.
JUSTIFY_RIGHT The prompt text appears right-aligned. This flag is only useful if the width of the prompt is explicitly specified.
JUSTIFY_CENTER The prompt text appears centered. This flag is only useful if the width of the prompt is explicitly specified.
TRANSPARENT The text background of the prompt appears transparent. This flag is only useful if the prompt is to be placed over coloured areas or a background image.
FONT(k) k = 0, 1, ..., 9 selects an entry in the font table. The font entered there is used. Fonts are entered with PMFonts in the
registered. 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.
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, the VOLATILE flag is meaningless and without function.

Prompt(StrucPmt, 9, 2, T("Formular","Sheet"))