---
title: "RadioButton (Basic)"
canonical: "https://docs.cuesystem.com/space/CVCGC/399704081/RadioButton%20(Basic)"
format: markdown
---
> Macro (toc)

---

# Description

This button is a two-state type of button and it enables users to join more buttons to a group of “just one button” type. In this type of button group, one button is in State Down and other buttons are in State Up. Every push of button sets State Down of this button and other joined buttons will go to the State Up. Button generates OnPush event.

RadioButton can also be used for navigation between different FullScreenWindow or MessageBox. RadioButton should be joined (by the Join property) with FullScreenWindow (MessageBox). If any RadioButton is pushed, FullScreenWindow (MessageBox) with the same join and corresponding NavigationBarButtonID will open, while FullScreenWindow (MessageBox) with different NavigationBarButtonID will close. FullScreenWindow (MessageBox) with different Join will not be affected.

# Properties

See section [https://cue.atlassian.net/wiki/spaces/CVCGC/pages/399769615/BasicButtons+Collection#Common-Properties](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/399769615/BasicButtons+Collection#Common-Properties) . In addition, this object uses the following properties.

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Behavior |
| Join |  | One of existing joins | Empty | It is used for joining more buttons together to one button group. |
| DefaultState | Long | STATE_UP = 1<br>STATE_DOWN = 2 | STATE_UP = 1 | Default state of the button. |
| NavigationBarButtonID | Long | 0 to maximum number of buttons in joined Navigation Bar | 0 | Value for joiningNavigation Bars. |

# Functions

See section [https://cue.atlassian.net/wiki/spaces/CVCGC/pages/399769615/BasicButtons+Collection#Common-Functions](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/399769615/BasicButtons+Collection#Common-Functions) . In addition, this object uses the following functions.

## IsButtonPressed 

By this function you can test whether a button is pushed (function returns True) or not (return value is False).

#### Syntax

```visualbasic
Function IsButtonPressed() As Boolean
```

## SetStateDown

This function sets a button to State Down. Other buttons with the same join will go to the State Up. Function returns True.

#### Syntax

```visualbasic
Function SetStateDown() As Boolean
```

## SetStateUp 

This function sets a button to State Up. Function returns True.

#### Syntax

```visualbasic
Function SetStateUp() As Boolean
```

## IsStateDown

This function returns True when the button is in State Down or False when the button is in State Up.

#### Syntax

```visualbasic
Function IsStateDown() As Boolean
```

## WaitWhilePressed 

This function waits for the end of button push. If optional timeout parameter is used, the maximum waiting time is limited by timeout value. In case of timeout excess, function returns False, otherwise it returns True.

#### Syntax

```visualbasic
Function WaitWhilePressed(Optional timeout As Time := _TIME_INFINITE) As Boolean
```

# Events

## OnPush 

This event is generated when the button is pushed.

#### Syntax

```visualbasic
Event OnPush As Process()
```