ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Combo Box control
  • Overview of the Combo Box control
  • Control in a window, control in a dynamic or static page
  • Creating a Combo Box control
  • To create a Combo Box control:
  • Type of the Combo Box control expanded area
  • Characteristics of Combo Box controls
  • Vocabulary
  • Swapping
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
Overview of the Combo Box control

Control in a window, control in a dynamic or static page

The Combo Box control displays a list of elements and allows users to select an element from the list.
Unlike a List Box, a Combo Box control is not expanded: the control is expanded on a user action or when the cursor is positioned on the list.
The elements displayed in a Combo Box control can be defined when creating the control in the editor. These elements:
  • are defined programmatically.
  • come from a data file or query.
Creating a Combo Box control

To create a Combo Box control:

  1. On the "Creation" tab, in the "Usual controls" group, click "Combo Box".
  2. Click at the desired location to create the control in the page or window. The Combo Box control creation wizard starts automatically.
AndroidiPhone/iPad Tip: You can include ready-to-use Combo Box controls in your applications (with associated data and code if necessary) by expanding the "Combo Box" option. A list shows a preview of the available controls with the project skin template and a "Go" icon that allows you to directly test the desired control. Simply click the control you want to create in the editor.
To view the characteristics of the control, select "Description" in the context menu.
Universal Windows 10 App For applications in Windows Store Apps mode, it is recommended to use a native Combo Box (select "Native Combo Box" in the "Details" tab of the control description window).
Universal Windows 10 AppAndroid

Type of the Combo Box control expanded area

The type of Combo Box control expanded area depends on the elements displayed by the Combo Box control .
To change the type of the Combo Box control expanded area, select "Expanded type" in the "Content" tab of the Combo Box description window ("Description" in the context menu).
The available types are as follows:
  • List Box: displays elements in a list-like format.
    For Combo Box controls based on a data file, the item displayed is defined in the "Content" tab of the control description window ("Description" in the context menu).
  • Table: displays elements in a table-like format. A "Combo Box with table" is automatically created if the Combo Box control must display more than one element.
    To view the characteristics of the list columns, select "Column description" in the control context menu (or click "Edit columns" in the "Content" tab of the Combo Box description window).
    For a Combo Box control, the displayed items are defined in the characteristics of the list columns ("Column description" in the context menu or "Edit columns" in the "Content" tab of the control based on a data file description window).
    Universal Windows 10 AppAndroidiPhone/iPad This type of expanded area is not available.
  • ListView: displays elements in a ListView-like format.
    To view the characteristics of the ListView, click "Edit ListView..." in the "Content" tab of the Combo Box description window.
    For a Combo Box control based on a data file, the item associated with the image caption and the one associated with the image are defined via the options "Displayed item" and "Image item" in the "Content" tab of the Combo Box description ("Description" in the context menu).
    Universal Windows 10 AppAndroidiPhone/iPad This type of expanded area is not available.
  • Popup window: opens a popup window.
    The popup window can be selected in the "Content" tab of the control description window ("Description" in the context menu).
    Universal Windows 10 AppAndroidiPhone/iPad This type of expanded area is not available.
Characteristics of Combo Box controls
Vocabulary
To easily handle a Combo Box control, you must be familiar with the following vocabulary:
Name Definition
Selection barAllows you to view the selected element in the expanded area. A specific color is used in most cases.
Combo Box based on a data fileThe Combo box control is based on a data file or query. The control elements correspond to the file records.
There are two types of Combo Box controls based on a data file:
  • Combo Box control with in-memory data source: The content of the control is loaded in memory then it is displayed in the control. Access to the elements of the Combo Box control is faster. This mode is reserved for data files with less than 100,000 records.
  • Combo Box control with direct access to the data source (no limit): The control displays the content of the data file or query. The current record corresponds to the selected element. Selecting an element in the control triggers an access to the linked data file. This type of control is reserved for data files with more than 100,000 records.
Combo Box populated programmaticallyThe Combo Box control is not based on a data file or query. The elements displayed in the Combo Box control are defined by the developer (in the description window or through programming).
Editable Combo BoxThe user can enter text in the edit control associated with the Combo Box. If "Assisted input" is selected, the user can easily select the element by typing the first letters: the letters typed are automatically completed with the corresponding element.
Non-editable Combo BoxThe user selects an element in the expanded area via the selection bar.

Swapping
Related Examples:
The Combo Box control Unit examples (WINDEV): The Combo Box control
[ + ] Using a Combo Box control
WD Managing a computer fleet Complete examples (WINDEV): WD Managing a computer fleet
[ + ] This example presents the management of a computer fleet with WINDEV.
The following topics are presented in this example:
1/ the printed reports,
2/ the graphic representation of the location of the computer,
3/ the automatically filled combo boxes.
Summary of the example supplied with WINDEV:
This example is used to manage a computer fleet.
For each computer, you will be able to define its characteristics, its components, the person who is using it as well as its location in the offices.
The EyeMagnet Unit examples (WINDEV): The EyeMagnet
[ + ] Using the "eYe magnet" mechanism (also called conditional formatting)
The "eYe magnet" consists in modifying the visual aspect of a control in order to attract the user's attention to this control. WINDEV allows you to automatically modify this visual aspect according to a set of conditions.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/21/2023

Send a report | Local help