PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • 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
  • In WEBDEV
  • Modifying the colors of a Check Box control row by row
  • In WINDEV and WINDEV Mobile
  • Modifying the caption characteristics
  • Properties specific to Check Box controls
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
WINDEV, WINDEV Mobile and WEBDEV allow 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 Check Box control. This variable is an integer.
Versions 18 and later
WINDEViPhone/iPad Note: Several WLanguage functions are used to add, insert or delete options in a Check Box control. See Functions for managing Check Box controls for more details.
New in version 18
WINDEViPhone/iPad Note: Several WLanguage functions are used to add, insert or delete options in a Check Box control. See Functions for managing Check Box controls for more details.
WINDEViPhone/iPad Note: Several WLanguage functions are used to add, insert or delete options in a Check Box control. See Functions for managing Check Box controls for more details.
WINDEVAndroidiPhone/iPad Note: Several WLanguage functions are used to add, insert or delete options in a Check Box control. See Functions for managing 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
  • ..Value:
    <Name of Check Box>[Option Subscript]..Value = True


    <Name of Check Box>[Option Subscript]..Value = 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
  • ..Value.
    <Name of Check Box>[Option Subscript]..Value = 0

    <Name of Check Box>[Option Subscript]..Value = False
Note: If the control is associated with a data file item, the assignment is automatically performed by using:
WINDEVWindows Mobile If the undefined status of an option is supported ("Details" screen of the control description or ..TriState), 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
WINDEVWINDEV MobileAndroidiPhone/iPadUniversal Windows 10 AppJava

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.
  • WINDEVWindowsWindows Mobile -1 if the box is undefined (if this state is supported by the option).
Note: If the control is associated with a file item, the value typed is automatically retrieved by using ScreenToFile. See Linking a Check Box control to an item for more details.
WEBDEV - Server codePHP

In WEBDEV

To retrieve the value of an option, you can use:
  • the direct assignment.
    <Option_Value> = <Name of Check Box>[Option Subscript]
  • ..Value.
    <Option_Value> = <Name of Check Box>[Option Subscript]..Value
In this case, <Option_Value> is a boolean set to:
  • True (1) if the box is checked,
  • False (0) if the box is unchecked.
Note: If the control is associated with a file item, the value typed is automatically retrieved by using PageToFile. See Linking a Check Box control to an item for more details.
Modifying the colors of a Check Box control row by row
WINDEVWindows Mobile

In WINDEV and WINDEV Mobile

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

<Control Name>..Text = gPen(<Color of Option 1>) + <Caption of Option 1> + TAB + ...
gPen(<Color of Option N>) + <Caption of Option N>
<Color of Option> corresponds to:
Modifying the caption characteristics
..Caption is used to:
  • change the caption of Check Box control:
    <Name of Check Box>..Caption = <Control Caption>
  • change the caption for all options of 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>..Caption = <Option 1> + TAB + <Option 2> + TAB + <Option 3>...
  • change the caption of an option:
    <Name of Check Box>[Option Subscript]..Caption = <New Caption for the Option>
  • retrieve the caption of an option:
    <Option Caption> = <Name of Check Box>[Option Subscript]..Caption
WINDEViPhone/iPadWindows Mobile If the Check Box control is using a display mode with images and/or sub-captions, you can:
  • find out and modify the option image with ..Image:
    <Name of Check Box>[Option Subscript]..Image = <New Image>
  • find out and modify the sub-caption of option with ..SubCaption:
    <Name of Check Box>[Option Subscript]..SubCaption = <New Sub-caption>
  • find out and modify the option height with ..Height:
    <Name of Check Box>[Option Subscript]..Height = <New Height in Pixels>
Properties specific to Check Box controls
The following properties are used to manage the characteristics of a Check Box control by programming.
HorizontalAlignmentUsed to find out and modify the horizontal alignment of a control.
VerticalAlignmentUsed to find out and modify the vertical alignment of a control.
ColorUsed to find out and modify the color of options in the Check Box control.
BrushColorUsed to find out and modify the background color of Check Box control.
HeightAllows you to find out and modify the option height (for the Check Box controls that are using a display mode with an image and/or a sub-caption).
ImageAllows 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).
CaptionUsed to find out and modify the caption of Check Box control or the caption of an option in the Check Box control.
NumberColumnUsed to find out the number of columns in a Check Box control.
OccurrenceUsed to find out the number of options in a Check Box control.
SubCaptionAllows 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).
TriStateUsed to manage the three states of an option in a Check Box control (checked, unchecked, undefined).
InitialValueUsed 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.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment