ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / ListView control
  • Overview
  • Initialization code of a programmed ListView control
  • HFSQL thumbnails
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
ListView control linked to a data file (or to a query)
Overview
A ListView control can be used to display the content of a data file (or the content of a query).
When a ListView control is linked to a data file (or to a query), this control can be initialized with the content of the data file:
  • automatically: No specific code is required to initialize the ListView control. The characteristics of the browse performed in the data file linked to the control are described in the "Content" tab of control description.
  • through programming: The code used to browse the data file linked to the ListView control must be entered in the initialization code of the control. This method is not recommended.
The content of two different items is displayed in the ListView control:
  • an item corresponding to the captions ("Text" item for example).
  • an item corresponding to the images ("Sound, Image, Binary" item for example).
Remark: When creating a ListView control, the wizard proposes to create the different types of listviews. For a ListView control linked to a data file or to a query, the wizard asks for the necessary information (data file used, items used, etc.).
Initialization code of a programmed ListView control
If you are using a ListView control based on a data file with programmed initialization, the code for browsing the data file must be entered in the initializing code of the control.
Example: Initializing a ListView control with the photographs found in the TRAVEL data file.
// -- Initialization code of ListView control
HReadFirst(TRAVEL, Photo)
WHILE NOT HOut()
ListAdd(LSV_TravelPhoto, TRAVEL.Photo)
HReadNext(TRAVEL, Photo)
END
HFSQL thumbnails
The item linked to the images displayed in the ListView control can use HFSQL thumbnails. In this case, the display of images will be optimized.
For more details, see HFSQL thumbnails.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help