ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / List Box control
  • Item characteristics
  • Handling the item and the List Box control
  • To update the List Box control with the value stored in the item:
  • To update an item with the index of the element selected in the List Box control:
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Binding a List Box control to an item
Item characteristics
A List Box control can be bound to an item in a data file, query, etc.
The following types of items can be bound to a List Box control:
  • Text,
  • Numeric,
  • Date or Time,
  • Radio Button, List Box, Combo Box.
The item bound to the List Box control will contain the index of the element selected in the List Box control.
Remark: When an item is bound to a List Box control, the content of the item is the same for all the records in the data file.
The contents of the List Box control can be:
  • entered directly in the data model editor,
  • entered in the window or page editor,
  • assigned in the code (with ListAdd).
Handling the item and the List Box control

To update the List Box control with the value stored in the item:

1st case: the controls in the window or page are bound to items in a data file
All the controls bound to an item in the data file (or a related file) will be updated by:
2nd case: the controls in the window or page are not bound to items in a data file
A value must be assigned to each control using the following syntax:
<Control name> = <Data file>.<Item>

To update an item with the index of the element selected in the List Box control:

1st case: the controls in the window or page are bound to items in a data file
All the items in the data file (or a related file) that are bound to a control in the window or page will be updated by:
2nd case: the controls in the window or page are not bound to items in a data file
The value of each control must be assigned to each item using the following syntax:
<Data file>.<Item> = <Control name>
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/05/2023

Send a report | Local help