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

---

# Description

This button behaves like a simple push button. It has only two states - State Up and State Pushed. The button is in State Pushed when it is pushed, otherwise, it is in State Up. The button generates OnPush event when it is pushed.

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

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

## WaitWhilePressed

This function waits for the end of the button push. If an optional timeout parameter is used, the maximum waiting time is limited by the timeout value. In case of timeout excess, the 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()
```