|
|
|
|
|
- Overview of the List Box control
- Creating a List Box control
- Vocabulary
- Notes
- File List Box control or Variable List Box control: Number of lines
- Limitations in Java
Overview of the List Box control The List Box control is used to display a list of elements and to select one or more elements from this list. The list is expanded, which means that multiple elements from the list are displayed in the window or page. The elements of a List Box control can: - be defined when the control is created in the editor.
- be defined programmatically.
- come from a data file or query.
- come from a variable (global to the project, window or page; class member, etc.).
Creating a List Box control To create a List Box control: - On the "Creation" tab, in the "Data" group:
- expand "Table and List Box" and click "List Box".
- click "List Box".
- expand "List Box" and click "List Box".
- Click at the desired location to create the control. The List Box control creation wizard starts automatically.
To view the characteristics of the control, select "Description" in the context menu. To easily handle a List Box control, you must be familiar with the following vocabulary: | | Name | Definition |
---|
Selection bar | Used to view the selected element. A specific color is used in most cases. | Vertical scroll | Scroll direction of the List Box control. A vertical scrollbar appears automatically if the number of elements in the List Box control exceeds the number of visible elements. If the size of an element exceeds the width of the List Box control, this element will be truncated. No horizontal scrollbar is automatically displayed. | List Box based on a data file | The List Box control is based on a data file or query. The elements of the List Box correspond to the records of the data file. There are two types of List Box controls based on a data file:- List file "Loaded into memory ": the contents of the List Box control are loaded into memory and displayed.. The elements of the List Box control can be accessed more quickly. This mode is reserved for data files with less than 100,000 records.
- List file "Direct access (unlimited) ": List Box control directly displays of the data file or query content. The current record corresponds to the selected element. Selecting an element in the List Box control triggers an access to the linked data file. This type of List Box control is reserved for data files with more than 100,000 records.
| List Box populated programmatically | The List Box is not based on a data file or query. The elements displayed in the List Box control are defined by the developer (in the description window or programmatically) | Single-selection List Box | The user can select a single element in the List Box control. | Multi-selection List Box | The user can select several elements at the same time in the List Box control. To select multiple elements, the user can do one of the following:- select the elements one by one holding the Ctrl key down.
- select several consecutive elements while holding the Shift key down.
| List Box based on a variable | The List Box control is based on a variable (global to the project, window or page; class member, etc.). |
Related Examples:
|
Unit examples (WINDEV): Moving elements between two list boxes
[ + ] Using the ListXXX functions to move one or more elements from a list to another one.
|
|
Unit examples (WINDEV): Graphic lists
[ + ] Handling the graphic lists: - Select or deselect an option in the list - Manage a multi-column list - Manage the selection by drag - Manage a "hidden" value
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|