---
title: "HorizontalSlider (Generic)"
canonical: "https://docs.cuesystem.com/space/CVCGC/420282380/HorizontalSlider%20(Generic)"
format: markdown
---
> Macro (toc)

---

# Properties

See section [https://cue.atlassian.net/wiki/spaces/CVCGC/pages/419463184/GenericSliders#Properties](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/419463184/GenericSliders#Properties) . In addition, this object uses the following properties.

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Behavior |
| FloodType | Long | 1 = LeftToRight  
2 = RightToLeft | 1 | Direction of flood |
| Appearance |
| AspectRatioMaximum | Double | > 0 | 10.0 | Maximum ratio between graphical data width (W) and height (H) when final graphical result doesn’t show undesirable effects.<br>Recommended value = (L + R + 2M) / H |
| AspectRatioMinimum | Double | > 0 | 1.0 | Minimum ratio between graphical data width (W) and height (H) when final graphical result doesn’t show undesirable effects.<br>Recommended value = (L +R) / H |

# Functions

See section [https://cue.atlassian.net/wiki/spaces/CVCGC/pages/419463184/GenericSliders#Functions](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/419463184/GenericSliders#Functions) . In addition, this object uses the following properties.

## SetFloodType

This function sets FloodType to newfloodtype. Function returns True if newfloodtype is 1 or 2, otherwise it returns False.

#### Syntax

```visualbasic
Function SetFloodType(newfloodtype As Long) As Boolean
```

## GetFloodType

This function returns current FloodType.

#### Syntax

```visualbasic
Function GetFloodType() As Long
```

# Requirements for Graphics

Graphical data (BackgroundPicture, FloodPicture and KnobPicture) must comply with the following rules

- BackgroundPicture and FloodPicturem must have the same dimensions incl. transparent area.
- Left (L) and right (R) edge might be unique.
- Middle part (M) must be uniformed in horizontal direction.
- KnobPicture height must match BackgroundPicture / FloodPicture height.

 

![image](media://ea246ba2-75a2-4f1c-bd10-775294caa3cb)

> ℹ️ W = object width 
> ℹ️ 
> ℹ️ H = object height
> ℹ️ 
> ℹ️ AspectRatio = W / H 
> ℹ️ 
> ℹ️ AspectRatioMaximum = (L + R + 2M) / H 
> ℹ️ 
> ℹ️ AspectRatioMinimum = (L +R) / H