.
Eloquence JDLG contact contact


JDLG object and attribute reference:
PopText class

 
.
  Document revision: 2024-05-27
Refers to JDLG version: 2.0.18


Contents


The PopText class implements a selectable list which displays one single line.

The current line is maintained by the cy attribute that is affected by the activeitem and activeline attributes. The current line is also used to specify the insertion and deletion position (delln, ins and line attributes).

When a PopText object has the keyboard focus, the cursor up/down keys may be used to select an entry in the list. In addition, the PopText class supports incremental search, where one or more characters may be typed in quick succession to select the matching entry. A pause of more than 750 milliseconds resets the current search pattern and starts a new search.

Note:

  • The height of a PopText object is fixed to one Dialog raster unit. The Poptext.h attribute may be used to define the number of visible items in the selectable list (see below).

activeitem : integer, get/set
Current active line (starting with 1, 0 = no active line).
Note: Setting activeitem affects cy.
activeline : integer, get/set
Same as activeitem (see above).
add : string, set
Adds new lines to the end of the list.
Lines are separated by LF (ASCII 10).
boxheight : integer, get/set
Specifies the number of visible lines in the selectable list. If the list contains more than the specified number of items, a vertical scroll bar is displayed.

The default value is zero (the system-defined number of items is displayed, typically 8 items).

Notes:

  • Requires JDLG version 2.0.14 or newer.

  • JDLG versions before 2.0.14 require the PopText height to be set to the number of visible lines plus 1. This is still supported for backward compatibility.
boxwidth : integer, get/set
Allows to set the box displaying the selectable list wider than the PopText object.

The default value is zero (item list width is equal to PopText width).

Notes:

  • The box displaying the item list is at least as wide as the PopText object. Setting boxwidth less than or equal to the PopText width has no effect.

  • Requires JDLG version 2.0.14 or newer.
class : string, get
Returns "PopText".
clear : integer or string, set
Deletes all lines in the list. The argument is ignored.
content : string, get/set
Used to get or set all lines at once.
Lines are separated by LF (ASCII 10).
cy : integer, get/set
Current line (starting with 0).
delln : integer, set
Deletes the specified number of lines, starting with the current line (cy).
h : integer, get/set
The height of a PopText object is fixed to one Dialog raster unit.

If the h attribute is set to a value greater than 1, the number of visible lines in the selectable list is set to h minus 1.

ins : string, set
Inserts a new line before the current line (cy).
length : integer, get
Returns the current content size (total number of characters).
line[] or line : string, get/set
Used to get or set the line with the specified index (starting with 1). If used without an index or with a zero index, the current line (cy) is affected.

Note: On DLG SET, a new line is appended if the specified line does not exist. On DLG GET, if used with an index, ERROR 660 is issued if the specified line does not exist. If used without an index or with a zero index, DLG GET returns an empty string if the specified line does not exist.

rowdata[] or rowdata : integer or string, get/set
User-defined data stored for the line with the specified index (starting with 1). If used without an index or with a zero index, the current line (cy) is affected.

DLG SET defines the data type (integer or string).

Note: ERROR 660 is issued if the specified line does not exist.

rule : integer, get/set
If nonzero, the rule value is returned to the program, along with the path of the PopText object, when the selected line changes.

When a rule is submitted, the cy and activeitem (activeline) attributes are set.

The default rule value is zero.

See also the documentation of the common rule attribute.

text[] or text : string, get/set
Alias for the line attribute (see above).
topitem : integer, set
Used to set the current line (starting with 0).
See also cy above.
traversecr : integer, get/set
Nonzero (default): Pressing the ENTER key either confirms the current selection and returns the PopText rule to the program if the selection list is open, or moves the focus to the next focusable object if the selection list is closed.

Zero: The ENTER key always triggers a PopText rule submission and does not move the focus.

vheight : integer, get
Returns the current number of lines.
vwidth : integer, get
Returns the number of characters of the currently widest line.


 
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision: 2024-05-27  
  Copyright © 1995-2024 Marxmeier Software AG