PC SOFT

WINDEV的在线文档

  • Overview
  • Initialization code of a programmed list box
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

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
H读第一个CUSTOMERCustName
只要不H超出()
列表添加LIST_List1Customer.CustName
H读下一个CUSTOMERCustName
结束