|
|
|
|
|
- Overview of the ListView control
- Creating a ListView control
- Specific features of Panorama mode
- Vocabulary
- Swapping
- ListView control / Looper control
Overview of the ListView control The ListView control is used to display a list of graphic elements (images, logos, etc.) and to select one or more elements in this list. Several display modes are available: - ListView mode: The ListView is expanded, i.e., several elements are displayed in the window.
- Standard List Box mode: Images are not displayed in the ListView. Only captions are displayed.
Panorama mode: Images appear as if they were displayed on a curved screen.
These elements can: - be defined programmatically.
- come from a data file or query.
Remark: ListView controls support drag-and-drop actions.. For more details, see Drag and Drop. Creating a ListView control To create a ListView control: - On the "Creation" tab, in the "Data" group, expand "Table and List Box" and select "ListView".
- Click at the desired location to create the control. The ListView control creation wizard starts automatically.
To view the characteristics of the control, select "Description" in the context menu. To easily handle a ListView control, you must be familiar with the following vocabulary: | | Name | Definition |
---|
Element | A ListView control is composed of several elements. Each element includes an image and a caption. | Display mode | A ListView control can be displayed:- in ListView mode: The ListView control will display images and captions.
- in "Standard List Box" mode: The ListView control will only display captions.
in "Panorama" mode: The ListView control will display the images with a curved effect.
| Selection bar | Used to view the selected element. A specific color is used in most cases. | Data-bound ListView | The ListView control is based on a data file or a query. The elements of the ListView correspond to the records of the data file. There are two types of ListView controls based on a data file:- ListView control with in-memory data source: The content of the ListView control is loaded in memory, then displayed. The elements of the ListView control can be accessed more quickly. This mode is reserved for data files with less than 100,000 records.
- ListView control with direct access to the data source (no limit): The ListView control displays the content of the data file or query directly. The current record corresponds to the selected element. Selecting an element in the ListView control triggers an access to the linked data file. This type of ListView control is reserved for data files with more than 100,000 records.
| ListView control populated programmatically | The ListView is not based on a data file or query. The elements displayed in the ListView control are determined by the developer, programmatically. | Single-selection ListView | The user can select a single element in the ListView control. | Multi-selection ListView | The user can select several elements at the same time in the ListView control (using the Ctrl key). | Vertical/Horizontal scroll | Scroll direction of the ListView control. A vertical scrollbar appears automatically if the number of elements in the ListView control exceeds the number of visible elements. A horizontal scrollbar appears automatically if the size of the elements is larger than the width of the ListView control. | ListView based on a variable | The ListView control is based on a variable (global to the project, window or page; class member, etc.). |
ListView control / Looper control A ListView control can be automatically transformed into a Looper control: - Select the ListView control to transform.
- On the "Modification" tab, in the "Transformations" group, expand "Refactoring and swapping" and select "ListView to Looper".
Related Examples:
|
Unit examples (WINDEV): The ListView control
[ + ] Using the ListView control of WINDEV. The ListView control is used to display the content of a list in thumbnail format. Like the List Box or Table controls, the ListView control can be a "memory" control (filled by programming) or a "browsing" control (linked to a database).
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|