PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview of ListView control
  • Creating the ListView control
  • Specific features of the Panorama mode
  • Vocabulary
  • Swapping
  • ListView/Looper
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview of ListView control
The ListView control is used to display a list of graphic elements (images, logo, ... ) and to select one or more elements in this list.
Several display modes are available:
  • ListView mode: The listview is expanded, which means that several listview elements are displayed in the window.
  • Standard List Box mode: The images are not displayed in the listview. Only the captions are displayed.
  • Versions 16 and later
    Windows Panorama mode: The images appear as if they were displayed on a curved wall.
    New in version 16
    Windows Panorama mode: The images appear as if they were displayed on a curved wall.
    Windows Panorama mode: The images appear as if they were displayed on a curved wall.
These elements can:
  • be defined by programming.
  • come from a data file or from a query.
Note: A listview can be used to perform an automatic "Drag and Drop". See Managing Drag and Drop for more details.
Creating the ListView control
To create a ListView control:
  1. In the window editor, click (or select "Insert .. Control .. ListView") .On the "Creation" pane, in the "Data" group:
    • Windows expand "Table and list" and select "ListView".
    • Windows Mobile expand "List" and select "ListView".
  2. Click the position where the control will be created in the window. The wizard for creating a ListView control is automatically started.
To display the control characteristics, select "Description" from the popup menu of control.
Versions 16 and later
Windows

Specific features of the Panorama mode

  • The ListView control can display up to 20 images. If the list contains more elements, the additional elements will be present but they will not be visible to the user.
  • Several features are not available: management of scrollbars, ...
New in version 16
Windows

Specific features of the Panorama mode

  • The ListView control can display up to 20 images. If the list contains more elements, the additional elements will be present but they will not be visible to the user.
  • Several features are not available: management of scrollbars, ...
Windows

Specific features of the Panorama mode

  • The ListView control can display up to 20 images. If the list contains more elements, the additional elements will be present but they will not be visible to the user.
  • Several features are not available: management of scrollbars, ...
Vocabulary
To easily handle a list box, you must be familiar with the following vocabulary:
NameDefinition
ElementA listview includes several elements. Each element includes an image and a caption.
Display modeA listview can be displayed:
  • in "ListView" mode: the images and captions will be displayed in the listview.
  • in "Standard list box" mode: only captions will be displayed in the ListView.
  • Versions 16 and later
    Windows in "Panorama" mode: the images will be displayed in the listview with a curved effect.
    New in version 16
    Windows in "Panorama" mode: the images will be displayed in the listview with a curved effect.
    Windows in "Panorama" mode: the images will be displayed in the listview with a curved effect.
Selection barUsed to view the selected element. A specific color is used in most cases.
Browsing listviewThe listview is based on a data file or on a query. The elements of the listview correspond to the records of the data file.
Two types of browsing listviews are available:
  • Browsing listview "Loaded in memory": the content of the listview is loaded in memory then it is displayed. The access to the listview elements is faster. This mode is reserved for the data files containing less than 100 000 records.
  • Browsing listview in "Direct access (no limit)": The listview directly displays the content of the data file or query. The current record corresponds to the selected element. Each move performed in the listview involves an access to the linked file. This type of listview is reserved for the data files containing more than 100 000 records.
Memory listviewThe listview is not based on a file or on a query. The elements displayed in the listview are defined by programming.
Single-selection listviewThe user can select a single element in the list.
Multiselection listviewThe user can select several elements at the same time in the list (via the CTRL key)
Vertical/Horizontal ScrollScroll direction of the listview.
A vertical scrollbar is automatically displayed if the number of elements displayed in the list exceeds the number of visible elements.
If the size of the elements is greater than the width of the list, an horizontal scrollbar is automatically displayed.
ListView on sourceThe listview is based on a variable (global to the project, to the window or to the page, class member, ...).
Swapping
Versions 16 and later

ListView/Looper

A ListView control can be automatically changed into a Looper control:
  1. Select the ListView control to transform.
  2. Select "Control .. Swap .. Listview to Looper".On the "Modification" pane, in the "Transformations" group, expand "Refactoring and swapping" and select "ListView to Looper".
New in version 16

ListView/Looper

A ListView control can be automatically changed into a Looper control:
  1. Select the ListView control to transform.
  2. Select "Control .. Swap .. Listview to Looper".On the "Modification" pane, in the "Transformations" group, expand "Refactoring and swapping" and select "ListView to Looper".

ListView/Looper

A ListView control can be automatically changed into a Looper control:
  1. Select the ListView control to transform.
  2. Select "Control .. Swap .. Listview to Looper".On the "Modification" pane, in the "Transformations" group, expand "Refactoring and swapping" and select "ListView to Looper".
Related Examples:
The ListView control Unit examples (WINDEV Mobile): The ListView control
[ + ] Handling the graphic lists.
This example is used to:
- Select or deselect an option in the list
- Manage a multi-column list
- Manage the selection by drag
- Manage a "hidden" value
PC Photo Album Windows (WINDEV Mobile): PC Photo Album
[ + ] The PC Photo Album example is used to import and export the photos of a Smartphone or Pocket PC from the PC.
A listview is used to preview the photos found on the Smartphone and on the Pocket PC.
Pocket Images Mobile (WINDEV Mobile): Pocket Images
[ + ] Image explorer for Pocket PC
Summary of the example supplied with WINDEV Mobile:
This example is used to browse a directory in order to find images.
The images are displayed in a ListView control.
To view the image in real size, double-click the image in the ListView control.
If the image is bigger than the size of the screen, scrollbars are automatically displayed in order to view the entire image.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment