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

---

# Description

This button has similar behavior to PushButton. It has only two states - State Up and State Pushed. Button is in State Pushed when it is pushed, otherwise, it is in State Up. When a button is pushed, it starts to generate OnRepeat() event periodically (with time period RepeatInterval) until the button is released.

# 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 |
| RepeatInterval | Time | Any positive | 0:0.4 | Period of generating events while a button is pushed. |

# 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.

## SetRepeatInterval 

This function sets the RepeatInterval of the button. The function returns True on success or False if an error occurs (i.e. newrepeatinterval <=:.0).

#### Syntax

```visualbasic
Function SetRepeatInterval(newrepeatinterval As Time) As Boolean
```

## GetRepeatInterval 

This function returns the current RepeatInterval of the button.

#### Syntax

```visualbasic
Function GetRepeatInterval() As Time
```

# Events

## OnRepeat 

This event is periodically generated while the button is pushed.

#### Syntax

```visualbasic
Event OnRepeat As Process()
```