AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Casilla de verificación
  • Presentación
  • Inicializar las diferentes opciones de una control Casilla de verificación
  • Recuperar el valor de una opción de una control Casilla de verificación
  • In WINDEV and WINDEV Mobile
  • In WEBDEV
  • Modificación de los colores de un control Casilla de verificación fila de fila
  • Modificación de las características de los subtítulos
  • Propiedades específicas de los controles de las casillas de verificación
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Presentación
WINDEV, WINDEV Mobile and WEBDEV allow you to manipulate a Check Box control programmatically. 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.
WINDEVAndroidiPhone/iPad Remark: Several WLanguage functions can be used to add, insert or delete options in a Check Box control.. For more details, see Check Box control functions.
Inicializar las diferentes opciones de una control Casilla de verificación
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:
  • direct assignment:
    <Check Box control>[Option index] = 1

    <Check Box control>[Option index] = True
  • property Value:
    <Check Box control>[Option index].Value = True

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

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

    <Check Box control>[Option index].Value = False
Remark: If the field is associated with an item in a data file, assignment is automatically performed using:
WINDEV 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:
<Check Box control>[Option index] = -1
Recuperar el valor de una opción de una control Casilla de verificación
WINDEVWINDEV MobileAndroidiPhone/iPadJava

In WINDEV and WINDEV Mobile

To retrieve the value of an option, use the following syntax:
<Option_Value> = <Check Box control>[Option index]

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 state is supported by the option).
Note If the field is associated with an item in a data file, the value entered is automatically retrieved using the <Window>.ToFile function. For more details, see Linking a Check Box control to an item.
WEBDEV - Código ServidorPHP

In WEBDEV

To retrieve the value of an option, you can use:
  • the direct assignment.
    <Option_Value> = <Check Box control>[Option index]
  • the Value property.
    <Option_Value> = <Check Box control>[Option index].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 field is associated with an item in a data file, the value entered is automatically retrieved using the <Page>.ToFile function. For more details, see Linking a Check Box control to an item.
WINDEV
Modificación de los colores de un control Casilla de verificación fila de fila
To modify the colors of a Check Box control row by row, use the following syntax:
<Check Box control>.Caption = gPen(<Color option 1>) + <Caption option 1> + TAB + ...
gPen(<Color of option N>) + <Caption of option N>

<Color of option> corresponds to:
Modificación de las características de los subtítulos
The Caption property allows you to:
  • change the caption of the Check Box control:
    <Check Box control>.Caption = <Control caption>
  • change the caption for all the options of the Check Box control:
    The options must be separated by the TAB character. You can specify the first options only.
    <Check Box control>.Caption = <Option 1> + TAB + <Option 2> + TAB + <Option 3> ...
  • change the caption of an option:
    <Check Box control>[Option index].Caption = <New option caption>
  • retrieve the caption of an option:
    <Option caption> = <Check Box control>[Option index].Caption
WINDEViPhone/iPad If the Check Box control uses a display mode with images and/or sub-captions, you can:
  • get and set the image of the option with the Image property:
    <Check Box control>[Option index].Image = <New image>
  • get and set the sub-caption of the option with the SubCaption property:
    <Check Box control>[Option index].SubCaption = <New sub-caption>
  • get and set the height of the option with the Height property:
    <Check Box control>[Option index].Height = <New height in pixels>
Propiedades específicas de los controles de las casillas de verificación
The following properties are specific to programmable Check Box control.
BackgroundColorGets and sets the background color of the Check Box control.
CaptionGets and sets the caption of Check Box control or the caption of an option in the Check Box control.
ColorGets and sets the color of options in the Check Box control.
CountGets the number of options in a Check Box control.
HeightGets and sets the option height (for the Check Box controls that are using a display mode with an image and/or a sub-caption).
HorizontalAlignmentGets and sets the horizontal alignment of a control.
ImageGets and sets the image associated with an option (if the Check Box control uses a display mode with an image).
InitialValueGets the initial value of a Check Box control.
NumberColumnGets the number of columns in the Check Box control.
SubCaptionGets and sets the sub-caption of an option (if the Check Box control uses a display mode with sub-captions).
TriStateAllows you to manage the three states of an option in a Check Box control (checked, unchecked, undefined).
VerticalAlignmentGets and sets the vertical alignment of a control.

For a complete list of WLanguage properties that can be used with Check box controls, see Check Box control properties.
Versión mínima requerida
  • Versión 23
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local