|
|
|
|
- Overview
- Initialization code of a programmed List Box control
List Box control linked to a data file or to a query
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
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|