Class

# WebRadioButton

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

A single radio button that appears as part of a `WebRadioGroup</api/user_interface/web/webradiogroup>` control.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                              | Type                               | Read-Only | Shared |
|-----------------------------------|------------------------------------|-----------|--------|
| `Caption<webradiobutton.caption>` | `String</api/data_types/string>`   |           |        |
| `Enabled<webradiobutton.enabled>` | `Boolean</api/data_types/boolean>` |           |        |
| `Tag<webradiobutton.tag>`         | `Variant</api/data_types/variant>` |           |        |
| `Value<webradiobutton.value>`     | `Boolean</api/data_types/boolean>` |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                       | Parameters                                                                                                            | Returns | Shared |
|--------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|---------|--------|
| `Constructor<webradiobutton.constructor0>` | value As `String</api/data_types/string>`, enabled As `Boolean</api/data_types/boolean>` = `True</api/language/true>` |         |        |

## Property descriptions

<div id="webradiobutton.caption">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebRadioButton.Caption

**Caption** As `String</api/data_types/string>`

> The text that appears next to the button.

<div id="webradiobutton.enabled">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebRadioButton.Enabled

**Enabled** As `Boolean</api/data_types/boolean>`

> When `True</api/language/true>` the <span class="title-ref">WebRadioButton</span> is drawn enabled and responds to user action. When `False</api/language/false>`, the control appears as disabled and does not respond to user actions.

<div id="webradiobutton.tag">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebRadioButton.Tag

**Tag** As `Variant</api/data_types/variant>`

> This can be used to store any value or object you wish to associate with the button.
>
> This example shows adding a <span class="title-ref">WebRadioButton</span> to a `WebRadioGroup</api/user_interface/web/webradiogroup>` with the Tag property set to the current date:
>
> ``` xojo
> Var button As New WebRadioButton("Today", True)
> button.Tag = DateTime.Now
> RadioGroup1.AddRow(button)
> ```

<div id="webradiobutton.value">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebRadioButton.Value

**Value** As `Boolean</api/data_types/boolean>`

> Indicates if the button is selected or not.

## Method descriptions

<div id="webradiobutton.constructor0">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebRadioButton.Constructor

**Constructor**(value As `String</api/data_types/string>`, enabled As `Boolean</api/data_types/boolean>` = `True</api/language/true>`)

> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> `Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.
>
> </div>
>
> Creates a new <span class="title-ref">WebRadioButton</span> with the caption set to the value passed. If the *enabled* parameter is `True</api/language/true>`, the button will be initially enabled.
>
> This example shows adding a <span class="title-ref">WebRadioButton</span> to a `WebRadioGroup</api/user_interface/web/webradiogroup>`:
>
> ``` xojo
> RadioGroup1.AddRow(New WebRadioButton("Today", True))
> ```
>
> This example shows adding a <span class="title-ref">WebRadioButton</span> to a `WebRadioGroup</api/user_interface/web/webradiogroup>` with the `Tag<webradiobutton.tag>` property set to the current date:
>
> ``` xojo
> Var button As New WebRadioButton("Today", True)
> button.Tag = DateTime.Now
> RadioGroup1.AddRow(button)
> ```

## Sample code

This example shows adding a <span class="title-ref">WebRadioButton</span> to a `WebRadioGroup</api/user_interface/web/webradiogroup>`:

``` xojo
RadioGroup1.AddRow(New WebRadioButton("Today", True))
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This example shows adding a <span class="title-ref">WebRadioButton</span> to a `WebRadioGroup</api/user_interface/web/webradiogroup>` with the `Tag<webradiobutton.tag>` property set to the current date:

``` xojo
Var button As New WebRadioButton("Today", True)
button.Tag = DateTime.Now
RadioGroup1.AddRow(button)
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | Web |
| **Operating Systems** | All |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `WebRadioGroup</api/user_interface/web/webradiogroup>` control.

</div>
