PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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/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 Combo Box control can be used to display the content of a data file or query, to allow a user or a Web user to select a record, for example.
When a List Box control is linked to a data file (or a query), it 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 characteristics of the browse in the data file linked to the List Box control are described in the "Content" tab of the List Box control description.
  • by programming: The code used to browse the data file linked to the List Box control must be entered in the initialization code of the control. 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 control linked to a data file or to a 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