|
|
|
|
|
- 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: - Image list mode: The image list is scrolled, i.e. several items from the list are displayed in the window.
- Classic list mode: Images are not displayed in the image list. Only captions are displayed.
Panorama mode: Images appear as if on a curved wall.
These elements can: - be defined programmatically.
- come from a data file or query.
Remark: An image list can be used for automatic "Drag and Drop".. 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 "Image List" mode: the ListView control will display images and labels.
- in "Classic List" mode: the ListView control will only display labels.
in "Panorama" mode: the ListView control will display images with a curved effect.
| Selection bar | Used to view the selected element. A specific color is used in most cases. | ListView based on a data file | 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 file "Loaded into memory ": the contents of the ListView control file are loaded into memory and 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 file "Direct access (unlimited) ": The ListView control directly displays the contents of the data file or query.. 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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|