---
title: "Property"
canonical: "https://docs.cuesystem.com/space/CVCHELP/510590977/Property"
format: markdown
---
> Macro (toc)

---

The graphic object can use properties. Properties are variables inside of the graphic class and they are visible and editable in IDE. The value of each property can be set by the user. Every property can use a default value defined by a programmer. If the user does not select a value in IDE, the default value is used. From a programming point of view, every property is a standard variable of the graphic class. Property can be declared using edit attributes as well as graphics class. These attributes affect the editing in the IDE. Properties can be declared only within a graphics class or in a device driver. 

#### Syntax 

```visualbasic
[Accessibility] Property Name As DataType [:= InitExpression] [WithAttributes {Attribute1[, Attribute2, ..., AttributeN]}]
```

#### Attribute: DisplayName 

|  |  |  |
| --- | --- | --- |
| Value type | Meaning | Example |
| Text | Name displayed in IDE. | DisplayName := "Button color" |

#### Attribute: EditMode 

|  |  |  |
| --- | --- | --- |
| Value type | Meaning | Example |
| Text | Defines the method of editing othestandardrd. |  |
| Color | The color selection using the numeric dialog box. The numeric type of the property must be Long. | EditMode := "Color" |
| Boolean | Selection from two values – True and False. Description texts for both values can be specified. | EditMode := "Boolean"<br>EditMode := "Boolean; 'Yes' := True, 'No' := False" |
| Enum | Selection from more items. It is necessary to define descriptive text and value for each item. This method can be used for different data types. | EditMode := "Enum; 'First' := 1, 'Second' := 2, 'Third' := 3" |
| Opacity | Setting the opacity. It can be used only for type Byte. | EditMode := "Opacity" |
| TimeInterval | SettiThe setting time interval. It can be used only for type Time. | EditMode := "TimeInterval" |
| Date | Setting of date and time. It can be used only for type Time. | EditMode := "Date" |

#### Attribute: PropertyGroup 

|  |  |  |
| --- | --- | --- |
| Value type | Meaning | Example |
| Text | It includes property to editing group. All properties included in one group are shown as a tree and it is possible to expand and collapse all items. | Info := "Any text for tooltip" |

#### Attribute: Info 

|  |  |  |
| --- | --- | --- |
| Value type | Meaning | Example |
| Text | Text which will be visible in a tooltip window for this property. | Info := "Any text " |

#### Example 

```visualbasic
Public Property PushButtonColor As Long WithAttributes {  PropertyGroup := "Color setting",  DisplayName := "Button color",  EditMode := "Color" }
```

#### Example of a group of properties 

```visualbasic
Protected Property m_Font As AddressOf _Font := Nothing WithAttributes 
{ 
  PropertyGroup := "Text", 
  DisplayName := "Font" 
} 

Protected Property m_HorizontalAlign As Long := 0 WithAttributes 
{ 
  PropertyGroup := "Text", 
  DisplayName := "Horizontal align", 
  EditMode := "Enum; 'Left' := _TEXT_ALIGNLEFT, 'Center' := _TEXT_ALIGNHCENTER, 'Right' := _TEXT_ALIGNRIGHT" 
} 

Protected Property m_VerticalAlign As Long := 0 WithAttributes 
{ 
  PropertyGroup := "Text", 
  DisplayName := "Vertical align", 
  EditMode := "Enum; 'Top' := _TEXT_ALIGNTOP, 'Center' := _TEXT_ALIGNVCENTER, 'Bottom' := _TEXT_ALIGNBOTTOM" 
}
```

Note: All properties in the example above are in the same group "Text".