ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / ListView control
  • Overview of the ListView control
  • Creating a ListView control
  • Specific features of Panorama mode
  • Vocabulary
  • Swapping
  • ListView control / Looper control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
  • Windows Panorama mode: The images appear as if they were displayed on a curved wall.
These elements can:
  • be defined through programming.
  • come from a data file or query.
Remark: A ListView can be used to perform an automatic Drag and Drop. For more details, see Managing Drag and Drop.
Creating a ListView control
To create a ListView control:
  1. On the "Creation" tab, in the "Data" group, expand "Table and List Box" and select "ListView".
  2. 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.
Windows

Specific features of Panorama mode

  • The ListView control can display up to 20 images. If the list contains more elements, the additional elements will be available but will not be visible to the user.
  • Some features are not available: management of scrollbars, etc
Vocabulary
To easily handle a ListView control, you must be familiar with the following vocabulary:
Name Definition
ElementA ListView control is composed of several elements. Each element includes an image and a caption.
Display modeA 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.
  • Windows in "Panorama" mode: the ListView control will display the images with a curved effect.
Selection barUsed to view the selected element. A specific color is used in most cases.
ListView based on a data fileThe 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 programmaticallyThe ListView is not based on a data file or query. The elements displayed in the ListView control are determined by the developer, through programming.
Single-selection ListViewThe user can select a single element in the ListView control.
Multi-selection ListViewThe user can select several elements at the same time in the ListView control (using the Ctrl key).
Vertical/Horizontal scrollScroll 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 variableThe ListView control is based on a variable (global to the project, window or page; class member, etc.).
Swapping

ListView control / Looper control

A ListView control can be automatically transformed into a Looper control:
  1. Select the ListView control to transform.
  2. On the "Modification" tab, in the "Transformations" group, expand "Refactoring and swapping" and select "ListView to Looper".
Related Examples:
The ListView control 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).
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help