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 / List Box control
  • Overview
  • Initialization code of a programmed List Box control
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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:
  • or automatically no specific code is required to initialize the List Box control field. The options to loop through the data file linked to the control can be defined in the "Content" tab of the control description.
  • or by programming You must enter the path code of the data file linked to the List Box control in the initialization code of the List Box control. This method is not recommended.
Note When creating a List Box control, the wizard prompts you for the information you need to create a List Box based on a data file or query.
Initialization code of a programmed List Box control
If you use a List Box control based on a data file with programmed initialization, you must write the code to loop through the data file in the control initialization code.
For example: Initialize a List Box control with customers from the CLIENT 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: 12/05/2024

Send a report | Local help