---
name: "CT XSLIDER"
type: topic
source: https://community.bistudio.com/wiki/CT_XSLIDER
revid: 365145
updated: 2024-07-27T09:52:47Z
---

# CT XSLIDER

### Introduction

- *Sliders* and *Scrollbars* are synonymous.
- While there are horizontal and vertical versions of [CT_SLIDER](../topics/CT_SLIDER.md) (see [Arma: GUI Configuration - CT_SLIDER Specific Styles](../topics/Arma~3A_GUI_Configuration.md#ct-slider-specific-styles)), [CT_XSLIDER](../topics/CT_XSLIDER.md) can only be horizontal.
- Embedded child scrollbars are created by the engine as and when required for various control types (e.g. [CT_CONTROLS_GROUP](../topics/CT_CONTROLS_GROUP.md) or [CT_LISTBOX](../topics/CT_LISTBOX.md)). The engine generates its own IDC for them. In most cases it is possible to configure (auto-generated) scrollbars via `Scrollbar` classes.

> [!IMPORTANT]
> It makes no sense to create an independent scrollbar without an IDC.

#### Related commands & functions

- Commands: General
- Commands: UI Eventhandlers
- [sliderPosition](../commands/sliderPosition.md)
- [sliderRange](../commands/sliderRange.md)
- [sliderSetPosition](../commands/sliderSetPosition.md)
- [sliderSetRange](../commands/sliderSetRange.md)
- [sliderSetSpeed](../commands/sliderSetSpeed.md)
- [sliderSpeed](../commands/sliderSpeed.md)

#### Related User Interface Eventhandlers

- [Events: General](../topics/User_Interface_Event_Handlers.md#generic-events)
- [onSliderPosChanged](../topics/User_Interface_Event_Handlers.md#onsliderposchanged)

### Alphabetical Order

> [!NOTE]
> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found [**here**](../topics/Arma~3A_GUI_Configuration.md#common-properties).

> [!WARNING]
> Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with [this](https://github.com/7erra/BIKI.VR/blob/master/fnc/generateCTPage.sqf) config crawler.

```cpp
#define CT_XSLIDER 43
```

#### A

##### arrowEmpty

**Type:** String

**Description:** n/a

```cpp
arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa";
```

##### arrowFull

**Type:** String

**Description:** n/a

```cpp
arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa";
```

#### B

##### border

**Type:** String

**Description:** n/a

```cpp
border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa";
```

#### C

##### color

**Type:** Array

**Description:** n/a

```cpp
color[] = {1,1,1,0.6};
```

##### colorActive

**Type:** Array

**Description:** n/a

```cpp
colorActive[] = {1,1,1,0.6};
```

##### colorDisable

**Type:** Array

**Description:** n/a

```cpp
colorDisable[] = {1,1,1,0.4};
```

#### L

##### lineSize

**Type:** Number

**Description:** n/a

```cpp
lineSize = 0.1;
```

#### S

##### sliderPosition

**Type:** Number

**Description:** n/a

```cpp
sliderPosition = 42;
```

##### sliderRange

**Type:** Array

**Description:** Defines the from-to range of the slider.

```cpp
sliderRange[] = {0, 1};
```

##### sliderStep

**Type:** Number

**Description:** Defines the increment size in which the value is changed when the slider is dragged.

```cpp
sliderStep = 1;
```

#### T

##### thumb

**Type:** String

**Description:** n/a

```cpp
thumb = "\a3\3DEN\Data\Controls\CtrlXSlider\thumb_ca.paa";
```

### Default Classes

> [!NOTE]
> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`
>
> ---
>
> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the [import](../topics/import_~28Config~29.md) keyword).
>
> In older versions, use `"Default" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the [description.ext](../topics/Description.ext.md).

#### RscXSliderH

```cpp
class RscXSliderH
{
    deletable = 0;
    fade = 0;
    type = CT_XSLIDER ;
    color[] = {1,1,1,0.6};
    colorActive[] = {1,1,1,1};
    colorDisable[] = {1,1,1,0.4};
    style = SL_HORZ + SL_TEXTURES;
    shadow = 0;
    x = 0;
    y = 0;
    h = 0.03;
    w = 0.4;
    colorDisabled[] = {1,1,1,0.2};
    arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa";
    arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa";
    border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa";
    thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa";
    tooltipColorText[] = {1,1,1,1};
    tooltipColorBox[] = {1,1,1,1};
    tooltipColorShade[] = {0,0,0,0.65};
};
```

<sub>Source: [BI Community Wiki — CT XSLIDER](https://community.bistudio.com/wiki/CT_XSLIDER) (revision 365145).</sub>
