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

---

# Description

This object serves for visual grouping of other objects only (buttons, bargraphs, ...). That means it can’t be a container for other objects. FillColor and Outline can be set by property.

![image](media://4f19f02e-1bb6-4293-9354-1425e251a5d6)

# Properties

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Behavior |
| Events | Boolean | True<br>False | False | If True event OnTouch is enabled. If False event OnTouch is disabled. |
| Appearance |
| FillColor | Long | Any | _COLOR_GREY | Color of object background |
| LineWeight | Long |  | 1 | Weight of outline |
| OutlineColor | Long | Any | _COLOR_BLACK | Color of outline |

# Functions

## SetEvents

This function enables (newevents = True) or disables (newevents = False) event OnTouch. Function returns True.

#### Syntax

```visualbasic
Function SetEvents(newevents As Boolean) As Boolean
```

## GetEvents

This function returns True (event OnTouch enabled) or False (event OnTouch disabled).

#### Syntax

```visualbasic
Function GetEvents() As Boolean
```

## SetFillColor

This function sets FillColor to newfillcolor. Function returns True.

#### Syntax

```visualbasic
Function SetFillColor(newfillcolor As Long) As Boolean
```

## GetFillColor

This function returns current FillColor.

#### Syntax

```visualbasic
Function GetFillColor() As Long
```

## SetLineWeight

This function sets LineWeight to newlineweight. Function returns True if newlineweight >= 0, otherwise it returns False.

#### Syntax

```visualbasic
Function SetLineWeight(newlineweight As Long) As Boolean
```

## GetLineWeight

This function returns current LineWeight.

#### Syntax

```visualbasic
Function GetLineWeight() As Long
```

## SetOutlineColor

This function sets OutlineColor to newoutlinecolor. Function returns True.

#### Syntax

```visualbasic
Function SetOutlineColor(newoutlinecolor As Long) As Boolean
```

## GetOutlineColor

This function returns current OutlineColor.

#### Syntax

```visualbasic
Function GetOutlineColor() As Long
```

## BringToFrontZOrder

This function temporarily brings the object to the very top position.

#### Syntax

```visualbasic
Function BringToFrontZOrder()
```

## RestoreZOrder

This function restores object’s z-order to value defined in design mode.

#### Syntax

```visualbasic
Function RestoreZOrder()
```

# Events

## OnTouch

This event is generated when the object is touched and property Events is set to True.

#### Syntax

```visualbasic
Event OnTouch As Process()
```