ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Check Box functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Inserts a new option into a Check Box control.
Example
// Inserts an option at position 2
CheckBoxAdd(CBOX_Options, 2, "Read a book on a tablet")
Syntax
<Result> = CheckBoxInsert(<Check Box control> , <Element index> , <Caption> [, <Sub-caption> [, <Image>]])
<Result>: Integer
  • Index of the inserted option.
  • -1 if an error occurred. To get more details on the error, use ErrorInfo.
<Check Box control>: Control name
Name of Check Box control into which the option will be inserted.
<Element index>: Integer
Index of the element to be inserted.
If this parameter:
  • is greater than the number of options found in the check box, the option is added after the last option found in the Check Box control.
  • is equal to 1 or 0, the element is added before the first option found in the Check Box control.
<Caption>: Character string
Text of the option to be added.
<Sub-caption>: Optional character string
Subtext of the option to be added.
If this parameter is not specified, the new option has no subtext.
If this parameter is specified, the subtext will be displayed even if the check box uses a display mode without subtext.
Android This parameter is not available.
<Image>: Optional character string
Image associated with the option to insert.
If this parameter is not specified, the added option has no image.
If this parameter is specified, the image will be displayed only if the check box is using a "Vista style" display mode (with image).
Android This parameter is not available.
Remarks
  • The characteristics of inserted option can also be modified by the following properties used on the option:
    • Caption property to change the text.
    • WINDEVUniversal Windows 10 AppiPhone/iPad SubCaption property to change the subtext.
    • WINDEV Image property to modify the image.
  • When inserting options into a Check Box control, the size of the control is not modified. The added options may not be visible if the control is not large enough. The control can be enlarged by the Width and Height properties.
  • To add an option after the existing options, use CheckBoxAdd.
  • When inserting an option:
    • the index of the inserted option is <Element index>.
    • option indices following the inserted option are automatically renumbered.
Component: wd290obj.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help