PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview of Check Box control
  • Check Box control in a window or in a page
  • Creating a Check Box control
  • Available display modes
  • Three-state check box
  • Check Box control in a report
  • Check Box in a Table control
  • Check box and databinding
  • Swap
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview of Check Box control
A Check Box can correspond to:
  • a control allowing the user to answer a question by yes or no in a window or in a page.
  • a column of a Table control allowing the user to select one or more rows in a Table control.
  • a box to check in a report.
Check Box control in a window or in a page
In the window editor or in the page editor, the Check Box control is a control allowing the user to answer a question by 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. The users selects the requested options. For each option, the check box returns the option status.
Example:

Creating a Check Box control

To create a Check Box control:
  1. In the window or page editor, click (or select "Insert .. Control .. Check Box").On the "Creation" pane, in the "Usual controls" group, click "Check Box".
  2. Click the position where the control will be created in the window or page. The control appears in creation mode.
Tip: You also have the ability to create a "preset" check box by expanding "Check Box". The list of available controls (with their preview in the skin template of project) is displayed. Simply click the requested control to create it in the editor.
Versions 24 and later
This list proposes to create Switch controls. See Switch control for more details.
New in version 24
This list proposes to create Switch controls. See Switch control for more details.
This list proposes to create Switch controls. See Switch control for more details.
To display the control characteristics, select "Description" from the popup menu of control.
Windows

Available display modes

WINDEV and WINDEV Mobile propose different display modes for the check boxes:
  • standard check box,
  • standard check box with sub-captions,
  • check box in Vista style (ability to use an image for each option),
  • check box in Vista style with sub-captions (ability to use an image for each option).
The different tabs in the description window are used to configure the control:
  • The display mode of the check box is selected in the "General" tab of control description.
  • The "Content" tab is used to enter the characteristics specific to the display mode (image, sub-caption, row height, ...) in the different application languages. These elements can be modified by programming.
  • The "Style" tab is used to define some characteristics specific to the display mode. You also have the ability to define:
    • Versions 16 and later
      the spacing between the caption and the sub-caption ("Sub-caption of options" element).
      New in version 16
      the spacing between the caption and the sub-caption ("Sub-caption of options" element).
      the spacing between the caption and the sub-caption ("Sub-caption of options" element).
    • the position of text of options: at the top, at the bottom, ... ("Text of options" element).
    • Versions 18 and later
      the checkmark position: at the top, at the bottom, ... ("Checkmark border" element).
      New in version 18
      the checkmark position: at the top, at the bottom, ... ("Checkmark border" element).
      the checkmark position: at the top, at the bottom, ... ("Checkmark border" element).
The programming mode can change according to the type of display. See Handling a check box by programming for more details.
Windows

Three-state check box

In the window editor, three states can be managed for the options of the Check Box controls.
At run time, 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.
In order for your check box to support the three-state options:
  • 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.
  • by programming, use ..TriState on one of the options found in the check box. This option will support the three states.
Check Box control in a report
Check Box in a Table control
Check box and databinding
Versions 15 and later
The databinding is available for the Check Box controls under the following conditions:
  • if the check box has a single option, it must be linked to a simple variable.
  • if the check box has several options, it must be linked to an array.
If this condition is not respected, a GUI error will be generated.
New in version 15
The databinding is available for the Check Box controls under the following conditions:
  • if the check box has a single option, it must be linked to a simple variable.
  • if the check box has several options, it must be linked to an array.
If this condition is not respected, a GUI error will be generated.
The databinding is available for the Check Box controls under the following conditions:
  • if the check box has a single option, it must be linked to a simple variable.
  • if the check box has several options, it must be linked to an array.
If this condition is not respected, a GUI error will be generated.
Swap
WINDEV, WINDEV Mobile and WEBDEV allow you to automatically transform a Check Box control into a Radio Button control (and conversely). To do so, select the control to transform and select "Control .. Swap .. Radio Button/Check Box".WINDEV, WINDEV Mobile and WEBDEV allow you to automatically transform a Check Box control into a Radio Button control (and conversely):
  1. Select the control to transform.
  2. On the "Modification" pane, 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
Video Check box
https://youtu.be/2IyxFC_rz-I

https://windevdesenvolvimento.blogspot.com/2019/07/dicas-2212-windev-webdev-mobile-24_22.html
amarildo
22 Jul. 2019