ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / List Box control
  • Overview
  • Initialization code of a programmed List Box 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
List Box control linked to a data file or to a query
Overview
A List Box or Combo Box control can be used to display the content of a data file or query, to allow a user to select a record, for example.
If linked, a List Box control can be initialized with the content of the data file or query:
  • automatically: no specific code is required to initialize the List Box control. The options to loop through the data file linked to the control can be defined in the "Content" tab of the control description.
  • programmatically: The code used to loop through the data file linked to the List Box control must be entered in the initialization code of the control. This method is not recommended.
Remark: When creating a List Box control, the wizard will ask for all the details required to link the control to a data file or query.
Initialization code of a programmed List Box control
If you are using a List Box control based on a data file with programmed initialization, the code for browsing the data file must be entered in the initialization code of the List Box control.
For example: Initialization of a List Box control with the customers of the CUSTOMER data file.
// -- Initialization code of a List Box control
HReadFirst(CUSTOMER, CustName)
WHILE NOT HOut()
ListAdd(LIST_List1, Customer.CustName)
HReadNext(CUSTOMER, CustName)
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/07/2022

Send a report | Local help