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 / Check Box control
  • Overview of the Check Box control
  • Check Box control in a window or page
  • Creating a Check Box control
  • Display modes available
  • Three-state check box
  • Check Box control in a report
  • Check Box in a Table control
  • Check Box control and data binding
  • Permuter
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview of the Check Box control
A Check Box control can correspond to:
  • a control allowing the user to answer a question with Yes or No in a window or page.
  • a column of a Table control allowing the user to select one or more rows.
  • a checkbox displayed in a report.
  • an interactive checkbox displayed in a form report.
Check Box control in a window or page
In the window or page editor, a Check Box control allows the user to answer a question with Yes or No:
  • if the option is checked, the option is set to True.
  • if the option is unchecked, the option is set to False.
A Check Box can display up to 256 options. Users select the desired options. For each option, the check box returns the option status.
Example:
Example of a check box

Creating a Check Box control

To create a Check Box control:
  1. On the "Creation" tab, in the "Usual controls" group, click "Check Box".
  2. Click where the control will be created in the window or page. The control appears in the editor.
Tip: It is also possible to directly create a "pre-formatted" Check Box control by scrolling down "Check Box control".. The list of available controls is displayed with the project skin template. Simply click the control you want to create in the editor.
This list proposes to create Switch controls. For more details, see Switch control.
To view the characteristics of the control, select "Description" in the context menu.
Windows

Display modes available

WINDEV and WINDEV Mobile feature different types of Check Box controls:
  • standard check box,
  • standard check box with sub-captions,
  • image switches (with the possibility of using one image on each option),
  • image switch with underline (with possibility of using one image on each option).
The different tabs of the description window allow you to configure the control:
  • The display mode of the Check Box control can be selected in the "General" tab of the control description.
  • The "Detail" tab allows you to:
    • Set up a three-state switch,
    • Set Check Box control options,
    • Setting the picture mode:
      • Size of image area and number of image states.
      • Selection banner display options.
  • The "Content" tab allows you to enter the characteristics specific to the display mode (image, underline, line height, etc.) in the different languages of the application.. These elements can be modified programmatically.
  • The "Style" tab is used to define some characteristics specific to the display mode. It is possible to define:
    • the spacing between the caption and the sub-caption ("Sub-caption of options" element).
    • the position of the options text: top, bottom, ... ("Option Text" element).
    • tick position: top, bottom, ... ("Tick frame" element).
The programming mode can change according to the type of display. For more details, see Handling a check box programmatically.
Windows

Three-state check box

In the window editor, you can enable three-state options for Check Box controls.
Three-state check box
At runtime, clicking an unchecked option will check the option and a second click on this option will give it an undefined value. In this case, the option returns -1.
To enable three-state options in a Check Box control:
  • check the corresponding option in the "Details" tab of the Check Box control description. All the options of the check box will support the three states.
  • through programming, use the TriState property on one of the check box options. This option will support three states.
Check Box control in a report
Check Box in a Table control
Check Box control and data binding
Check Box controls can use data binding under the following conditions:
  • if the Check Box control has a single option, it must be linked to a simple variable
  • if the Check Box control has several options, it must be linked to an array.
If this condition is not respected, a UI error will be generated.
Permuter
WINDEV, WINDEV Mobile and WEBDEV allow you to automatically transform a Check Box control into a Radio Button control and vice versa:
  1. Select the control to transform in the window or page.
  2. On the "Modification", in the "Transformations" group, expand "Refactoring and swapping" and select "Radio Button / Check Box".
Related Examples:
The Check Box control Unit examples (WINDEV): The Check Box control
[ + ] Using a check box control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/19/2024

Send a report | Local help