ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Radio Button functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Inserts a new option into a Radio Button control.
Example
// Insère une option à la position 2 
SEL_Options.Insère(2, "Lire un livre sur une tablette")
Syntax
<Result> = <Radio Button control>.Insert(<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.
<Radio Button control>: Control name
Name of Radio Button 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 in the Radio Button control, the option is added at the last position.
  • is equal to 1 or 0, the element is added before the first option in the Radio Button control.
<Caption>: Character string
Text of the option to be added.
<Sub-caption>: Optional character string
Sub-heading of option to be added.
If this parameter is not specified, the new option has no subtext.
If this parameter is specified, the sub-caption will be displayed even if the radio button uses a display mode without sub-caption.
Android This parameter is not available.
<Image>: Optional character string
Image associated with the option to add.
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 radio button uses a "Vista style" display mode (with image).
Android This parameter is not available.
Remarks
  • The characteristics of added option can also be modified via the following properties used on the option:
  • When inserting options into a Radio Button control, the control size 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 <Radio button>.Add.
  • When inserting an option:
    • the index of the inserted option is <Element index>.
    • if the radio button uses option numbering, the options following the inserted option are automatically renumbered.
  • Use of returned values If the picker uses returned values, you can define the value returned by the inserted option using the ReturnedValue property.
    For example:
    nIndice is int
    nIndice = SEL_Option.Insère(2, "Lire un livre sur une tablette")
    SEL_Option[nIndice].ValeurRenvoyée = "Tablette"
    // Sélection de la nouvelle option
    SEL_Option = "Tablette"
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/26/2024

Send a report | Local help