ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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:
  • 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.
  • Windows 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:
  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.
  • Several functions are not available: elevator management, 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 "Image List" mode: the ListView control will display images and labels.
  • in "Classic List" mode: the ListView control will only display labels.
  • Windows in "Panorama" mode: the ListView control will display 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 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 programmaticallyThe 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 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: 09/30/2024

Send a report | Local help