PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Initialization code of a programmed list box
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
List Box control linked to a data file or to a query
Overview
A list box or a combo box can be used to display the content of a file or query, to allow a user or a Web user to select a record for example.
When a list box is linked to a data file (or to a query), the list box can be initialized with the content of the data file (or with the content of the query):
  • automatically: no specific code is required to initialize the list box. The characteristics of the browse performed in the data file linked to the list box are described in the "Content" tab of the List Box description.
  • by programming: The code used to browse the data file linked to the list box must be entered in the initialization code of the list box. This method is not recommended.
Note: When creating a List Box control, the wizard asks for the different details required to create a list box linked to a data file or to a query.
Initialization code of a programmed list box
If you are using a list box 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.
For example: Initializing a list box with the customers found in CUSTOMER file.
// -- Initialization code of a list box
HReadFirst(CUSTOMER, CustName)
WHILE NOT HOut()
ListAdd(LIST_List1, Customer.CustName)
HReadNext(CUSTOMER, CustName)
END
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment