ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Combo Box control
  • Item characteristics
  • Handling the item and the Combo Box control
  • To update the Combo Box control with the value stored in the item:
  • To update the item with the index of the element selected in the Combo Box control:
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Binding a Combo Box control to an item
Item characteristics
A Combo Box control can be bound to an item in a data file, query, etc.
The following types of items can be bound to a Combo Box control:
  • Text,
  • Numeric,
  • Date or Time,
  • Radio Button, List Box, Combo Box.
The item bound to the Combo Box control will contain the index of the element selected in the control.
Note When a field is associated with a Combo Box control, the content of the combo is the same for all records in the data file. For example, if the Combo Box item contains the options "Paid", "In progress", and "Pending", this content will be the same for all records.
The contents of the Combo 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 Combo Box control

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

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

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

1st case: window or page fields are bound to fields in a data file (Binding)
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:
Case 2: window or page fields are not associated with fields 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: 12/05/2024

Send a report | Local help