---
title: "Common Section of Generic object collection"
canonical: "https://docs.cuesystem.com/space/CVCGC/407535672/Common%20Section%20of%20Generic%20object%20collection"
format: markdown
---
> Macro (toc)

---

# Properties

![image](media://638ed563-0837-4363-aa5b-d91942016478)

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Position |
| X | Long | 0 to screen  
resolution width |  | X position of left top corner of object |
| Y | Long | 0 to screen  
resolution height |  | Y position of left top corner of object |
| Width | Long | Depends on the object | Depends on the object | Width of the object |
| Height | Long | Depends on the object | Depends on the object | Height of the object |
| Behavior |
| Visible | Boolean | True, False | True | Visibility of object. It tells to rendering system whether the object should be drawn on the touch panel or not. |
| Locked | Yes, No | No |  | By this property it is possible to lock position and size of object in IDE (while programming touch panel, not in runtime). |
| Join |  | One of the existing joins | Empty | It is used for joining more objects together (for example Radio Buttons or NavigationBars with Page). |
| Appearance |
| Opacity | Byte | Any (0-255) | 255 (100%) | Opacity of object. If opacity is 0, object is invisible (fully transparent). |

# Functions

## SetObjectPosition

This function sets the position of object to newx and newy values. The function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function SetObjectPosition(newx As Long, newy As Long) As Boolean
```

## GetObjectPosition

This function returns the current position of object in parameters currentx and currenty.

#### Syntax

```visualbasic
Function GetObjectPosition(ByRef currentx As Long, currenty As Long)
```

## SetObjectDimensions

This function sets dimensions of object to newwidth and newheight values. The function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function SetObjectDimensions(newwidth As Long, newheight As Long) As Boolean
```

## GetObjectDimensions

This function returns current size of object in parameters currentwidth and currentheight.

#### Syntax

```visualbasic
Function GetObjectDimensions(ByRef currentwidth As Long, ByRef currentheight As Long)
```

## ShowObject

This function shows object, property Visible is set to True.

#### Syntax

```visualbasic
Function ShowObject()
```

## HideObject

This function hides object, property Visible is set to False.

#### Syntax

```visualbasic
Function HideObject()
```

## IsObjectVisible

This function returns value of property Visible. This function does not return real visibility of object (object should be hidden behind another object), it returns the information whether the object should be drawn or not.

#### Syntax

```visualbasic
Function IsObjectVisible()
```

## SetOpacity

This function sets opacity of the entire object, 0 sets object fully transparent, 255 sets object fully opaque. If object is partially opaque (opacity is 1 to 254), it requires much more processor power for drawing than when opacity is 0 or 255 (100%).

#### Syntax

```visualbasic
Function SetOpacity(newopacity As Byte)
```

## GetOpacity

This function returns current opacity of object (0 to 255).

#### Syntax

```visualbasic
Function GetOpacity() As Byte
```

# Function Rules

Properties of objects can be set by the functions SetNameOfProperty (newnameofproperty as TypeOfProperty) as Boolean.

Property values can be obtained by functions GetNameOfProperty () as TypeOfProperty.

All functions, constants and events have public scope. Value of newnameofproperty is checked and if it is out of limits, function returns False (and does not change property in cases where in would have no meaning).

Otherwise the function returns True on success.