PC SOFT

WINDEV的在线文档

  • Overview
  • Initializing the different options of a Check Box control
  • Retrieving the value of an option in a check box
  • In WinDev and WinDev Mobile
  • Modifying the colors of a Check Box control row by row
  • In WinDev and WinDev Mobile
  • Modifying the characteristics a caption
  • Properties specific to the Check Box controls
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Handling a Check Box control by programming

Overview
WinDev, WinDev Mobile and WebDev enable you to handle a Check Box control by programming. To do so, use the variable of the Check Box control in the code.

The variable of the Check Box control corresponds to the name of the Check Box control. This variable is an integer.

18版本和更高版本
WinDev Note: Several WLanguage functions are used to add, insert or delete options in a Check Box control. See Functions for managing the Check Box controls for more details.
18新版本
WinDev Note: Several WLanguage functions are used to add, insert or delete options in a Check Box control. See Functions for managing the Check Box controls for more details.
WinDev Note: Several WLanguage functions are used to add, insert or delete options in a Check Box control. See Functions for managing the Check Box controls for more details.

Initializing the different options of a Check Box control
By default, no option is checked when a Check Box control is displayed.

To check an option of a Check Box control, you can use:

  • the direct assignment:
    <Name of Check Box>[Option Subscript] = 1

    <Name of Check Box>[Option Subscript] = True
  • ..值:
    <Name of Check Box>[Option Subscript]..值 = True


    <Name of Check Box>[Option Subscript]..值 = 1
To clear an option of a Check Box control control, you can use:
  • the direct assignment:
    <Name of Check Box>[Option Subscript] = 0

    <Name of Check Box>[Option Subscript] = False
  • ..值.
    <Name of Check Box>[Option Subscript]..值 = 0

    <Name of Check Box>[Option Subscript]..值 = False
Note: If the control is associated with a data file item, the assignment is automatically performed by using:See Linking a Check Box control to an item for more details.

WinDev If the undefined status of an option is supported ("Details" screen of the control description or ..三状态), the following syntax is used to initialize the option in the undefined status:

<Name of Check Box>[Option Subscript] = -1

Retrieving the value of an option in a check box
WinDev

In WinDev and WinDev Mobile

To retrieve the value of an option, use the following syntax:

<Option_Value> = <Name of Check Box>[Option Subscript]

In this case, <Option_Value> is a boolean set to:
  • True (1) if the box is checked
  • False (0) if the box is unchecked.
  • WinDevWindows -1 if the box is undefined (if this status is supported for the option).
Note: If the control is associated with an item found in a data file, the entered value is automatically retrieved by using 屏幕填充到数据库表. See Linking a Check Box control to an item for more details.

Modifying the colors of a Check Box control row by row
WinDev

In WinDev and WinDev Mobile

To modify the colors of a Check Box control row by row, use the following syntax:

<Control Name>..文本 = 图示画笔(<Color of Option 1>) + <Caption of Option 1> + TAB + ...
图示画笔(<Color of Option N>) + <Caption of Option N>

<Color of Option> corresponds to:

Modifying the characteristics a caption
..标签 is used to:
  • change the caption of the Check Box control:
    <Name of Check Box>..标签 = <Control Caption>
  • change the caption for all the options of the Check Box control:
    The options must be separated by the TAB character. You have the ability to specify the first options only.
    <Name of Check Box>..标签 = <Option 1> + TAB + <Option 2> + TAB + <Option 3> ...
  • change the caption of an option:
    <Name of Check Box>[Option Subscript]..标签 = <New Caption for the Option>
  • retrieve the caption of an option:
    <Option Caption> = <Name of Check Box>[Option Subscript]..标签

WinDev If the Check Box control uses a display mode with images and/or sub-captions, you can:
  • find out and modify the image of the option with ..图片:
    <Name of Check Box>[Option Subscript]..图片 = <New Image>
  • find out and modify the sub-caption of the option with ..副标签:
    <Name of Check Box>[Option Subscript]..副标签 = <New Sub-caption>
  • find out and modify the height of the option with ..高度:
    <Name of Check Box>[Option Subscript]..高度 = <New Height in Pixels>

Properties specific to the Check Box controls
The following properties are used to manage the characteristics of a Check Box control by programming.
水平对齐Used to find out and modify the horizontal alignment of a control.
垂直对齐Used to find out and modify the vertical alignment of a control.
颜色Used to find out and modify the color of the options found in the Check Box control.
背景颜色Used to find out and modify the background color of the Check Box control.
高度Allows you to find out and modify the height of the option (for Check Box controls using a display mode with an image and/or a sub-caption).
图片Allows you to find out and modify the image associated with an option (if the Check Box control is using a display mode with an image).
标签Used to find out and modify the caption of the Check Box control or the caption of an option found in the Check Box control.
列数Used to find out the number of columns in a Check Box control.
数目Used to find out the number of options in a Check Box control.
副标签Allows you to find out and modify the sub-caption of an option (if the Check Box control is using a display mode with sub-captions).
三状态Used to manage the three states of an option in a Check Box control (checked, unchecked, undefined).
初始值Used to find out the initial value of a Check Box control.

To find out the entire list of WLanguage properties that can be used with a Check box control, see Properties associated with a Check Box control.