---
title: "BasicRotaryPickers Collection"
canonical: "https://docs.cuesystem.com/space/CVCGC/400687134/BasicRotaryPickers%20Collection"
format: markdown
---
> Macro (toc)

---

# Description

Rotary pickers show one or more values using a spinning-wheel. You just rotate the wheel until a row of values is aligned with a selection indicator to select your value. This collection includes NumericRotaryPicker and TextRotaryPicker. Both types have common properties, functions and events described in this section.

The following figure shows the basic parts of a rotary picker.

![image](media://4f89008a-ed0f-43f9-a3c2-61233d23ce80)

The following types of BasicRotaryPickers are available

> Macro (children)

# Common Properties

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Behavior |
| RotateInfinitely | Boolean | True False | False | If True the rotary picker rotates infinitely, otherwise it rotates between Minimum and Maximum. |
| Appearance |
| Font | AddressOf _Font | Any | fntDefault20 | Values font. fntDefault is Verdana 20 pixel high. |
| HorizontalAlign | Long | Left Center<br>Right | Center | Horizontal align of values |
| HorizontalShift | Long | Any | 0 | Horizontal shift of values in pixels |
| NumberOfLinesToDisplay | Long | 3<br>5<br>... 17<br>19 | 5 | Number of visible lines. It must be odd number in range 3 to 19. |
| VerticalShift | Long | Any | 0 | Vertical shift of values in pixels |

# Common Functions

## SetFont

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

#### Syntax

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

## GetFont

This function returns current font of values.

#### Syntax

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

## SetHorizontalAlign

This function sets horizontal align of value text. You can use constants as parameter

- _TEXT_ALIGNLEFT
- _TEXT_ALIGNHCENTER
- _TEXT_ALIGNRIGHT

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

#### Syntax

```visualbasic
Function SetHorizontalAlign(newhorizontalalign As Long) As Boolean
```

## GetHorizontalAlign

This function returns the current horizontal align of value text.

#### Syntax

```visualbasic
Function GetHorizontalAlign() As Long
```

## SetHorizontalShift

This function sets horizontal shift of value texts. Function returns True, if absolute value of newhorizontalshift <= ObjectWidth, otherwise it returns False.

#### Syntax

```visualbasic
Function SetHorizontalShift(newhorizontalshift As Long) As Boolean
```

## GetHorizontalShift

This function returns current HorizontalShift.

#### Syntax

```visualbasic
Function GetHorizontalShift() As Long
```

## SetNumberOfLinesToDisplay 

This function sets NumberOfLinesToDisplay to newnumberoflinestodisplay value. Function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function SetNumberOfLinesToDisplay(newnumberoflinestodisplay As Long) As Boolean
```

## GetNumberOfLinesToDisplay

This function returns current NumberOfLinesToDisplay.

#### Syntax

```visualbasic
Function GetNumberOfLinesToDisplay() As Long
```

## SetRotateInfinitely

This function sets RotateInfinitely to newrotateinfiniely value and returns True.

#### Syntax

```visualbasic
Function SetRotateInfinitely(newrotateinfinitely As Boolean) As Boolean
```

## GetRotateInfinitely

This function returns current value of property RotateInfinitely.

#### Syntax

```visualbasic
Function GetRotateInfinitely() As Boolean
```

## GetTotalLines

This function returns total number of values.

#### Syntax

```visualbasic
Function GetTotalLines() As Long
```

## SetVerticalShift

This function sets vertical shift of value texts. It returns True, if absolute value of newverticalshift <= ObjectHeight, otherwise it returns False.

#### Syntax

```visualbasic
Function SetVerticalShift(newverticalshift As Long) As Boolean
```

## GetVerticalShift

This function returns current VerticalShift.

#### Syntax

```visualbasic
Function GetVerticalShift() As Long
```

# Common Events

## OnStop 

This event is generated when rotary picker stops. Current value is delivered in parameter newvalue.

#### Syntax

```visualbasic
Event OnStop As Process(newvalue As Double)
```

## OnChange 

This event is generated when the rotary picker value changes. Current value is delivered in parameter newvalue.

#### Syntax

```visualbasic
Event OnChange As Process(newvalue As Double)
```