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

---

# Description

ThisbuttonhassimilarbehaviorlikePushButton.Ithasonlytwostates-StateUpandStateDown.Buttonis in State Down 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.

![image](media://717a1de1-a23c-4b3d-b38e-ab1bee963edf)

# Properties

See section [https://cue.atlassian.net/wiki/spaces/CVCGC/pages/417234965/GenericButtons#Common-Properties](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/417234965/GenericButtons#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 button is pushed. |

# Functions

See section [https://cue.atlassian.net/wiki/spaces/CVCGC/pages/417234965/GenericButtons#Common-Functions](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/417234965/GenericButtons#Common-Functions). In addition, this object uses the following properties.

## SetRepeatInterval

This function sets 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()
```