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

---

# Description

This object displays text. Text can be set from external sources as well using function SetText.

![image](media://b14823a9-a847-4402-9ba5-9dc93eea660d)

# Properties

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Appearance |
| DisplayBackground | Boolean | Yes  
No | Yes | Specifies whether the background is shown. |
| Caption |
| Align | Long | Left-Top   
Left-Middle   
Left-Bottom   
Center-Top  
Center-Middle Center-Bottom   
Right-Top   
Right-Middle  
Right-Bottom | Center-Middle | Horizontal and vertical align of caption text. |
| Font | AddressOf _Font | Any | fntDefault16 | Caption font. fntDefault16 is Verdana 16 pixels high. |
| FontColor | Long | Any | _COLOR_BLACK | Color of UpText |
| Text | AddressOf Text | Any | “Caption” | Text shown in Caption. |

# Functions

## SetAlign

This function sets align of Text. You can use meaningful BitOr combinations of the following constants as parameters:

- _TEXT_ALIGNLEFT, _TEXT_ALIGNHCENTER, _TEXT_ALIGNRIGHT
- _TEXT_ALIGNTOP, _TEXT_ALIGNVCENTER, _TEXT_ALIGNBOTTOM

The function returns True on success or False if an error occurs (i.e. parameter has wrong value).

#### Syntax

```visualbasic
Function SetAlign(newalign As Long) As Boolean
```

## GetAlign

This function returns the current align of Text.

#### Syntax

```visualbasic
Function GetAlign() As Long
```

## SetDisplayBackground

This function sets whether background is visible or not.

#### Syntax

```visualbasic
Function SetDisplayBackground(newdisplaybackground As Boolean) As Boolean
```

## GetDisplayBackground

This function returns whether background is visible or not.

#### Syntax

```visualbasic
Function GetDisplayBackground() As Boolean
```

## SetFont

This function sets the font of Text. Function returns True.

#### Syntax

```visualbasic
Function SetFont(newfont As AddressOf _Font) As Boolean
```

## GetFont

This function returns addressof Text font.

#### Syntax

```visualbasic
Function GetFont() As AddressOf _Font
```

## SetFontColor

This function sets new Text color. Function returns True.

#### Syntax

```visualbasic
Function SetFontColor(newfontcolor As Long) As Boolean
```

## GetFontColor

This function returns the current Text color.

#### Syntax

```visualbasic
Function GetFontColor() As Long
```

## SetText

This function sets the current Text to newtext. As newtext you can use the direct value of text (SetText (“Hello”)). In this case you will lose the possibility of changing the language of this caption. You can also use addressof text (SetText (txtHello)) as parameter (txtHello must be declared in MyCommon/Text resources). In this case it is possible to change the language of the Text. Function returns True.

#### Syntax

```visualbasic
Function SetText(newtext As Text) As Boolean
```

## GetText

This function returns addressof the current Text.

#### Syntax

```visualbasic
Function GetText() As AddressOf Text
```