PC SOFT

WINDEV的在线文档

  • Overview of the Check Box control
  • Check Box control in a window or page
  • Creating a Check Box control
  • Available display modes
  • Three-state check box
  • Check Box control in a report
  • Using a Check Box control
  • Check box in a Table control
  • "Check box" column in a Table control
  • Check box and databinding
  • Swapping
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview of the 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.
16版本和更高版本
WinDevLinux The Check Box controls are now available for the WinDev applications in Linux.
16新版本
WinDevLinux The Check Box controls are now available for the WinDev applications in Linux.
WinDevLinux The Check Box controls are now available for the WinDev applications in Linux.
18版本和更高版本
WinDevWindows Store apps This type of control is now available for the applications in Windows Store apps mode.
18新版本
WinDevWindows Store apps This type of control is now available for the applications in Windows Store apps mode.
WinDevWindows Store apps This type of control is now available for the applications in Windows Store apps mode.

Check Box control in a window or 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 .
  • if the option is unchecked, the option is set to .
A check box can display up to 256 options. The users selects the requested options. For each option, the check box returns the status of the option.

Example:

Creating a Check Box control

To create a Check Box control:
  1. In the window editor or in the page editor, click(or select "Insert .. Control .. Check box").On the "创建" pane, in the "常用控件" group, click "复选框".
  2. Click the position where the control must be created in the window or in the page. The control appears in creation mode.
WinDev Tip: You also have the ability to create a "preset" check box by clicking the arrow found on the right of the icon. The list of available controls (with their preview in the skin template of the project) is displayed. All you have to do is click the requested control to create it in the editor.
WinDev 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 the project) is displayed. All you have to do is click the requested control to create it in the editor.

To display the characteristics of the control, select "Description" from the popup menu of the control.

WinDev Note: You have the ability to manage a general tooltip for the control or a tooltip for each one of the control options ("Help" tab).

WinDevWindows Store apps

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).
Windows Store apps The check boxes in Vista style are not available.

The different tabs of the de description window are used to configure the control:
  • The display mode of the check box is selected in the "General" tab of the control description.
  • The "Content" tab is used to enter the characteristics specific to the display mode (image, sub-caption, row height, ...) in the different languages of the application. 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:
    • 16版本和更高版本
      the spacing between the caption and the sub-caption ("Sub-caption of the options" element).
      16新版本
      the spacing between the caption and the sub-caption ("Sub-caption of the options" element).
      the spacing between the caption and the sub-caption ("Sub-caption of the options" element).
    • the position of the text of the options: at the top, at the bottom, ... ("Text of the options" element).
    • 18版本和更高版本
      the position of the checkmark: at the top, at the bottom, ... ("Checkmark border" element).
      18新版本
      the position of the checkmark: at the top, at the bottom, ... ("Checkmark border" element).
      the position of the checkmark: 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.

WinDevWindows Store apps

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 description window of the Check Box control. All the options of the check box will support the three states.
  • by programming, use ..三状态 on one of the options found in the check box. This option will support the three states.

Check Box control in a report
WinDev In the report editor, the Check Box control corresponds to a box to check:
  • If the value of the control is set to True, the box is checked:
  • If the value of the control is set to False, the box is unchecked:
To create a Check Box control
  1. In the report editor, click.On the "创建" pane, in the "常用控件" group, click "复选框".
  2. Click the position where the control must be created in the report. The control appears in creation mode.
To display the characteristics of the control, select "Description" from the popup menu of the control.

WinDev

Using a Check Box control

In order for the Check Box control to be displayed properly on the end-user computers, the Wingdings font must be installed on their computers.

Check box in a Table control
WinDev

"Check box" column in a Table control

To allow the check box to be checked (or not) when clicking the "Check box" column:
  1. The Table control must be in edit.
  2. The "Check box" column must be in edit.
  3. All the other columns of the Table control must be read-only.

Check box and databinding
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.
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.

Swapping
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 "修改" pane, in the "转换" group, expand "重构和切换" and select "Radio button/Check box".