List Box object

On the Graphics tab, in the Active Objects group, click List Box to create a List Box object on your screen. Generally, when you run a project, the active List Box object displays a list of messages.

On a screen containing only one List Box object and no text input boxes, the List Box object will be active automatically.

On a screen containing multiple List Box objects and text input boxes, you can use a cursor (pointing device) or the Tab key to select and activate a List Box object.

You can select a message from the active list box during runtime and write the message value to a tag. (If a list is too long to fit within the viewable area of a List Box object, the object provides scroll bars.)

Use the Enter Reqd box on the Object Properties dialog to configure selected messages as follows:
To add List Box objects to a screen:
  1. On the Graphics tab of the ribbon, in the Active Objects group, click List Box.
  2. Click in the screen and drag to create/adjust an expanding rectangle.

    Height and the font size determine how many messages are visible.

    Width determines how much of the message length is visible.

    After creating a rectangle, you can adjust the size and font characteristics to allow more messages to display in the given space.

  3. Double-click on the object to open the Object Properties dialog.
Figure 1. Object Properties: List Box

Tip: You also can open the Object Properties dialog, by right-clicking on the List Box object or by highlighting the object, pressing the Alt+Enter keys, and selecting Properties from the resulting shortcut menu.
You can use this dialog to specify the following parameters:

Messages Configuration Dialog

Figure 2. Message Configuration dialog

Use the parameters on this dialog as follows:
  • State field (read-only): Use this field to view the indexed individual messages. IWS numbers this field based on the Read/Search Tag type you selected:
    • Boolean: Provides two valid states, labeled 0 and 1
    • Integer: Provides 255 valid states, labeled 1 to 255
    • LSB: Provides 32 valid states (32 bits in an integer value) labeled 0 to 31
  • Message field: Enter the string to be displayed in the List Box object. You can include tags in a message by enclosing them in curly brackets (e.g., {tagname}).
  • Value field: Type a message value matching the specified Read/Search Tagvalue. (Also, the same value written to the write tag.)

    If you specify LSB for the Value field, IWS uses the value specified in the State field for both the Read/Search Tagand the write tag.

  • Text Foreground color field: Click to specify a color for the message text foreground. When the Color dialog displays, click on a color to select it, and close the dialog.
  • Text Blink checkbox: Click (check) to cause a selected message to blink, once per second, when it displays.
  • Fonts button: Click to open the Font dialog, which allows you to change the characteristics (style, size, and so forth) of the message font.
  • Enable translation: Click (check) to enable translation during runtime using the Translation Tool.
  • Auto Format: When checked, if a message includes a decimal value enclosed by curly brackets (e,g, {1.2345}) or a tag of Real type (see Message above), then the value will be formatted according to the virtual table created by the SetDecimalPoints() function.