PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Initializing the different options of a Check Box control
  • Retrieving the value of an option of a Check Box control
  • In WEBDEV
  • Modifying the colors of a Check Box control row by row
  • 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.
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 control>[Option subscript] = 1

    <Name of Check Box control>[Option subscript] = True
  • the property ..Value:
    <Name of Check Box control>[Option subscript]..Value = True


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

    <Name of Check Box control>[Option subscript] = False
  • the property ..Value.
    <Name of Check Box control>[Option subscript]..Value = 0

    <Name of Check Box control>[Option subscript]..Value = False
Remark: If the control is associated with a data file item, the assignment is automatically performed via:
Retrieving the value of an option of a Check Box control
WEBDEV - Server codePHP

In WEBDEV

To retrieve the value of an option, you can use:
  • the direct assignment.
    <Option_Value> = <Name of Check Box control>[Option subscript]
  • the property ..Value.
    <Option_Value> = <Name of Check Box control>[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.
Remark: If the control is associated with an item found in a data file, the entered value is automatically retrieved by using <Page>.ToFile. See Linking a Check Box control to an item for more details.
Modifying the colors of a Check Box control row by row
Modifying the caption characteristics
The Property ..Caption allows to:
  • change the caption of Check Box control:
    <Name of Check Box control>..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 control>..caption = <Option 1> + TAB + <Option 2> + TAB + <Option 3> ...
  • change the caption of an option:
    <Name of Check Box control>[Option subscript]..Caption = <New option caption>
  • retrieve the caption of an option:
    <Option caption> = <Name of Check Box control>[Option subscript]..Caption
Properties specific to Check Box controls
The following properties are used to manage the characteristics of a Check Box control by programming.
HorizontalAlignmentAllows you to know and modify the horizontal framing of an Control.
VerticalAlignmentAllows you to know and modify the vertical framing of an Control.
ColorUsed to find out and modify the color of options in the Check Box control.
BackgroundColorUsed 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).
LibelléUsed to find out and modify the caption of Check Box control or the caption of an option in the Check Box control.
NumberColumnAllows to know the number of columns of the Check Box control.
OccurrenceEnables you to know the number of options present in an 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).
TriStateAllows to manage the three states of an Check Box control option (checked, unchecked, indifferent).
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 version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment