---
title: "webCUE commands"
canonical: "https://docs.cuesystem.com/space/WCSG/286130179/webCUE%20commands"
format: markdown
---
### Function Color(red As Byte, green As Byte, blue As Byte) As Long

This command converts components red, green, and blue to a long value.

Parameters

- red - Byte. It is a red component of color
- green - Byte. It is a green component of color
- blue - Byte. It is a blue component of color

Return value Long. Color as Long value.

# Label commands

### Function SetText(newtext As Text) As Boolean

This command sets a new label text.

Parameters

- newtext - Text It is a new text for label.

Return value Boolean. This function returns True on success or False if an error occurs.

# Page commands

### Process OnShow()

This event is invoked when a page is showed.

### Function SetText(newtext As Text) As Boolean

This command sets a new page text.

Parameters

- newtext - Text It is a new text for page.

Return value Boolean This function returns True on success or False if an error occurs.

# Button commands

### Function SetIcon (newicon As Text) As Boolean

This command sets a new icon on button. Please select icon from IconSymbols set in MyProject Instances window and then drag and drop selected icon name to source code.

Parameters

- newicon - Text It is a new icon for button.

Return value Boolean This function returns True on success or False if an error occurs.

![image](media://fa95a4a8-2a6e-4968-9566-6c0331f14d9c)

### Function SetIndicator(newcolor As Long) As Boolean

This command sets a new color to indicator on the button. You can use named constants (_COLOR_RED, _COLOR_GREEN, etc.) or you can use webCUE command Color to convert components red, green and blue to a long value.

Parameters

- newcolor - Long It is a new color of the indicator.

Return value Boolean This function returns True on success or False if an error occurs.

### Function SetIndicatorstate(newstate As Boolean) As Boolean

This command sets a new state to indicator on the button. If it is True, indicator is display.

Parameters

- newstate - Boolean It is a new state of the indicator.

Return value Boolean This function returns True on success or False if an error occurs.

### Function SetText(newtext As Text) As Boolean

This command sets a new button text.

Parameters

- newtext - Text It is a new button text.

Return value Boolean This function returns True on success or False if an error occurs.

### Function SetToggleState(state As Long) As Boolean

This command sets a new button toggle state.

You can use for button type:

- Toggle 2 states: 1, 2
- Toggle 3 states: 1, 2, 3
- Toggle 4 states: 1, 2, 3, 4

Parameters

- state - Long It is a new button toggle state.

Return value Boolean This function returns True on success or False if an error occurs.

### Process OnPush (state As Long)

This process is invoked by system. The invocation of the event and meaning of the value of the state parameter is dependent on button type.

|  |  |  |
| --- | --- | --- |
| ButtonType | When is process invoked | Meaning of the value of the state parameter |
| PushButton | button is released | value is 1 |
| Repeat 0.2 sec | every 0.2 sec until button is pressed | value is 1 |
| Repeat 0.3 sec | every 0.3 sec until button is pressed | value is 1 |
| Repeat 0.4 sec | every 0.4 sec until button is pressed | value is 1 |
| Repeat 0.5 sec | every 0.5 sec until button is pressed | value is 1 |
| Toggle 2 states | button is released | value is 1 or 2 depending on the toggle state |
| Toggle 3 states | button is released | value is 1, 2 or 3 depending on the toggle state |
| Toggle 4 states | button is released | value is 1, 2, 3 or 4 depending on the toggle state |