String

String(name~aliasName, flags, x, y, w)

Parameter
Parameter   Description
name * identifier
aliasName   additional identifier
flags   flags
x * position X (in minicells)
y * position Y (in minicells)
w * width (in minicells)
* - mandatory parameter

The tuple (class, access path) defines a mapping to model data (see FillWindow, DrainWindow). It is possible to change the font color in the widget. To do this, only the color specification, such as LIGHTRED will be indicated as the flag.

Flags
Flag Description
HIDDEN The input field stays hidden until the statement Show makes it appear on the screen.
VIEW_ONLY The input field can display data only. It is not possible to enter characters interactively.
NON_SELECTABLE The check box cannot be selected. The text is displayed in grey. This state can be suspended via  Unlock.
JUSTIFY_RIGHT The input field text appears right-aligned. This flag makes sense only if prompt width has been specified explicitly.  
JUSTIFY_CENTER The input field text appears centered. This flag makes sense only if prompt width has been specified explicitly.
FONT(k) k = 0, 1, ..., 9 selects a font table entry. The selected font will be used. Fonts are entered into the table via PMFonts. There are predefined fonts for 0, 1 and 2. The font index can later be modified with SetFont.
NO_DRAIN The input field is filled with FillWindow, but ignored by DrainWindow.
NO_CLEAR ClearWindow does not delete the input field.
LIGHTRED The text field font color appears red. Other colors are also possible. Please note that the usually prefixed COLOR causes a syntax error - specify color name only!
OVERWRITE Statement DrainWindow writes into the data field which is connected to the window object such as Put(..., OVERWRITE). This flag has an effect only if DrainWindow is executed for a CX_OVERWIRTING_REF object (or any derived object).
VOLATILE, VOLATILE(identifier) The input field should only be displayed, if the date to be displayed actually exists. If the date doesn't exist, it is automatically hidden by FillWindow. When is object data missing? This is the case, 


* if an object Slot does not exist
* if an access path pointer has the value ZERO
* if an access path function provides ZERO 
* when accessing the k-th collection element with cardinality <k


With a function, it is possible to decide anywhere in the access path, whether this path should be continued or not. Other window objects - such as the input field prompt - are often supposed to be displayed or hidden, too. For these objects, the VOLATILE flag will be specified with the same identifier that identifies a group of logically connected window objects. In case a window object refers directly to a 'normal' model object data member, the flag VOLATILE is useless.

PASSWORD Entered characters are displayed as *.
LOWER_CASE Entered characters are converted into lower case letters.
UPPER_CASE Entered characters are converted into capitals.
HELP(anchor) Help("file~anchor") Connects the window object with the Online Help in HTML format. If no file name has been specified, the HTML file specified in the module applies.
HELP(n) To use the platform (OS/2 PM, MS Windows) help system, it is necessary to specify an integer n, which refers to the equivalent help window. n has to be < 40000.

Information:  For portability reasons, HTML is recommended as online help for InstantView® applications.

String(PageNumber, 590, 4, 50)
[

  SELECT: GetValue Dup if

          {

            Widget(, printView) Call(GoToPage)

          }
          else

          {

            T("Keine gültige Nummer!", "No such page!")

            Attention(AbortTXN) cancel

          }
 

  // With page up and cursor up, increment the value of the string field and update it!

  PG_UP  :
  C_UP   : GetValue Integer 1 + PutValue
 

  // With page down and cursor down, decrement the value of the string field and update it!

  PG_DOWN:
 
C_DOWN : GetValue Integer 1 - PutValue
]

See also