ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / List Box functions
  • Limitations
  • List Box control based on a data file
  • Last element
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Returns the number of elements in a List Box, ListView or Combo Box control.
Note: The <List Box>.Count function can be used on both:
  • List Box controls based on a data file or populated programmatically,
  • single-selection or multi-selection List Box controls.
Example
// Nombre d'éléments présents dans le champ "LISTE_ListeClient"
ResNombreElément = LISTE_ListeClient.Occurrence()
Syntax
<Result> = <List Box control>.Count()
<Result>: Integer
Number of elements (rows) found in the specified control.
<List Box control>: Control name
Name of the List Box or Combo Box control to be used.
Remarks

Limitations

If the specified List Box or Combo Box control is linked to a data file that contains more than 2,147,483,647 records, the returned value is truncated to this value.
WINDEVWEBDEV - Server codeReports and QueriesAndroidiPhone/iPadJavaUser code (UMC)Ajax

List Box control based on a data file

For a List Box control based on a data file, <List Box>.Count returns:
  • the total number of records found in the linked file if no filter was defined.
  • the number of records matching the filter if a filter was defined.
  • the number of records found in the query linked to the control.
The end of initialization code of control is run once the total is calculated.

Caution: The time required to calculate the number of records may be long.

Last element

To position on the last element of List Box control, use the following syntax:
<Champ Liste>.SelectPlus(<Champ Liste>.Occurrence)
or
<Champ Liste> = <Champ Liste>.Occurrence
or
<Champ Liste> = <Champ Liste>.Occurrence()

Miscellaneous

  • To find out the number of rows in a Table control, use <Table>.Count.
  • <List Box>.Count can be used on a "Combo Box" table column.
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/26/2024

Send a report | Local help