Version 6.3.13 for Windows
 —  Dialog Component Reference  —

List Box Item

This document covers the following topics:


Description

A list box item is an item inside a list box control.

The list box items are added to the list box control either by specifying them in the dialog editor's List Box Attributes window, or by using the PROCESS GUI statement actions ADD-ITEMS, ADD-ITEMS-EX or ADD.

Items created using the dialog editor are represented in a Natural variable. The variable name is generated as: list-box-handle-name -ITEMS (1: number-of-list-box-items). Example: #LB-1-ITEMS (1:5). The fifth item would then be called: #LB-1-ITEMS (5).

Items created with the PROCESS GUI statement can be given any variable name in the HANDLE definitions. Example: #MYITEM-1 HANDLE OF LISTBOXITEM.

To sort list box item STRINGs alphabetically, you use the SORTED attribute for the list box control. When the STRING of a list box item is changed, the items are automatically sorted again. You can then go through the list of items with the SUCCESSOR attribute and the new sort sequence is reflected. For more information on how to go through a list of items, see Working with List Box Controls and Selection Box Controls in the section Event-driven Programming Techniques.

A list box item does not receive any events. Instead, the list box control receives them, triggering event handlers there.

Note:
To select or deselect individual list box items at runtime, hold down CTRL while clicking with the left mouse button.

Top of page

Attributes for List Box Item

Attribute Name Query Set/Modify In Attr. Window
CLIENT-DATA X X/X  
CLIENT-HANDLE X X/X  
CLIENT-KEY X X/X  
CLIENT-VALUE X X/X  
FIRST-CHILD X -/-  
LAST-CHILD X -/-  
PARENT X X/-  
PREDECESSOR X -/-  
SELECTED X X/X  
SELECTED-SUCCESSOR X -/-  
STRING X X/X X
SUCCESSOR X X/-  
TYPE X X/-  

Note:
To be able to use SELECTED-SUCCESSOR, the parent list box control must have MULTI-SELECTION = TRUE.

Top of page

Events

This dialog element does not create events.

Top of page