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

---

# Description

NavigationBar is a window mainly used for navigation between different FullScreenWindows or MessageBoxes. It has up to eight predefined graphic buttons. NavigatioBar is automatically resized to the width of touch panel and placed to the bottom of the screen. That is why this object does not have functions for settings size and position.

NavigationBar should be joined (by the Join property) with FullScreenwindows or MessageBoxes. If any button on NavigatinBar is pushed, FullScreenwindow with the same join and corresponding NavigationBarButtonID will open, while windows with different NavigationBarButtonID will close. Windows with different Join will not be affected.

![image](media://ed1cfba0-3e27-4bae-9e00-1188484e1174)

> 📝 #### Note
> 📝 
> 📝 Don’t forget to place the command ShowObject to the Autoexec. Window joined with DefaultButton property of NavigationBar will open automatically.

# Properties

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Behavior |
| DefaultButton | Long | 0 to Maximum number of used buttons in NavigationBar | 1 | Number of button, which is activated upon initialization of NavigationBar |
| Appearance |
| Button1 | Long | -1 = NotUsed  
0 = Blank  
1 = Temperature  
2 = Lights  
3 = Home  
4 = AV  
5 = Reservation  
6= Security  
7 = Blinds  
8 = Settings1  
9 = Settings2  
10 = Weather  
11 = Applications  
12 = Notes  
13 = Basic Control  
14 = Audio | NotUsed | Appearance of button<br>-1 – no button and no empty space   
0 – no button, empty space   
1 to 14 - different button icons |
| ... | ... | ... | ... | ... |
| Button8 | The same as Button1 | The same as Button1 | The same as Button1 | The same as Button1 |

# Functions

## SetButtonAppearance

Valid for BasicContainersAndNavigations from version 2.03.

This function sets appearance of button to newappearance.

#### Syntax

```visualbasic
Function SetButtonAppearance(
  button As Long, 
  newappearance As Long) 
As Boolean
```

Parameter button means button number 1 to 8. 

Parameter newappearance means

- -1 – no button and no empty space
- 0 – no button, empty space
- 1 to 14 - different button icons

You can use the following predefined constants for newappearance parameter

- BUTTON_APPEARANCE_NOT_USED                As Long := -1
- BUTTON_APPEARANCE_BLANK                     As Long := 0
- BUTTON_APPEARANCE_TEMPERATURE          As Long := 1
- BUTTON_APPEARANCE_LIGHTS                     As Long := 2
- BUTTON_APPEARANCE_HOME                      As Long := 3
- BUTTON_APPEARANCE_AV                           As Long := 4
- BUTTON_APPEARANCE_RESERVATION           As Long := 5
- BUTTON_APPEARANCE_SECURITY                 As Long := 6
- BUTTON_APPEARANCE_BLINDS                     As Long := 7
- BUTTON_APPEARANCE_SETTINGS1               As Long := 8
- BUTTON_APPEARANCE_SETTINGS2               As Long := 9
- BUTTON_APPEARANCE_WEATHER                 As Long := 10
- BUTTON_APPEARANCE_APPLICATIONS          As Long := 11
- BUTTON_APPEARANCE_NOTES                     As Long := 12
- BUTTON_APPEARANCE_BASIC_CONTROL       As Long := 13
- BUTTON_APPEARANCE_AUDIO                     As Long := 14

For example, if instance of NavigationBar is named NavigationBar1, you can use as parameter NavigationBar1. BUTTON_APPEARANCE_HOME. Function NavigationBar1.SetButtonAppearance (1, NavigationBar1.BUTTON_ APPEARANCE_HOME) sets button nr. 1 to home icon.

It is good practice to use function SetSelectedButton after using this function to avoid potential conflicts. For example if you set some button to BUTTON_APPEARANCE_NOT_USED, after that use SetSelectedButton to another valid button.

The function returns True on success or False if an error occurs (parameter is out of range).

## GetButtonAppearance

Valid for BasicContainersAndNavigations from version 2.03.

This function returns current appearance of button. See function SetButtonAppearance for return values. If button is out of range 1 to 8 function returns BUTTON_APPEARANCE_NOT_USED.

#### Syntax

```visualbasic
Function GetButtonAppearance(button As Long) As Long
```

## SetSelectedButton

This function sets selected button to newselectedbutton. Joined window with corresponding NavigationBarButtonID has been open, other joined windows have been closed. The function returns True on success or False if an error occurs (parameter is out of range).

#### Syntax

```visualbasic
Function SetSelectedButton(newselectedbutton As Long) As Boolean
```

## GetSelectedButton

This function returns current selected button of NavigationBar.

#### Syntax

```visualbasic
Function GetSelectedButton() As Long
```

# Events

## OnPress

This event is raised if a button on NavigationBar is pressed. Number of pressed button is placed to the parameter buttonid.

#### Syntax

```visualbasic
Event OnPress As Process(buttonid As Long)
```