# WaynesSliderState class
{: .no_toc }

A bundle of the style objects that describe a single visual state of a [**WaynesSlider**](/tB/Packages/CustomControls/WaynesSlider/index.md). Each slider holds three parallel instances ([**NormalState**](/tB/Packages/CustomControls/WaynesSlider/index.md#normalstate), [**HoverState**](/tB/Packages/CustomControls/WaynesSlider/index.md#hoverstate), [**FocusedState**](/tB/Packages/CustomControls/WaynesSlider/index.md#focusedstate)); the slider picks one at each repaint depending on the mouse / focus state.

The state has two halves --- the *background* (the full track behind the block) and the *block* (the draggable rectangle that indicates [**Value**](/tB/Packages/CustomControls/WaynesSlider/index.md#value)). Each half has its own [**Fill**](/tB/Packages/CustomControls/Styles/Fill.md), [**Borders**](/tB/Packages/CustomControls/Styles/Borders.md), and [**Corners**](/tB/Packages/CustomControls/Styles/Corners.md). A [**TextRendering**](/tB/Packages/CustomControls/Styles/TextRendering.md) on the state controls how the optional [**DisplayFormat**](/tB/Packages/CustomControls/WaynesSlider/index.md#displayformat) text is drawn on the block.

[**InitializeDefaultValues**](#initializedefaultvalues) pre-sets the block to a solid mid-blue ([**WAYNESCOLOR_BLUE**](#) --- `&HAC7220`) fill, a 2-pixel black background border, and a transparent block border that acts as inner padding inside the background.

The type itself is `Public Class` but cannot be instantiated from outside the package --- instances are accessed only through the slider's **NormalState** / **HoverState** / **FocusedState** properties.

## Properties

### BackgroundBorders
{: .no_toc }

The [**Borders**](/tB/Packages/CustomControls/Styles/Borders.md) drawn around the background track.

### BackgroundCorners
{: .no_toc }

The [**Corners**](/tB/Packages/CustomControls/Styles/Corners.md) that controls the per-corner shape and radius of the background track.

### BackgroundFill
{: .no_toc }

The [**Fill**](/tB/Packages/CustomControls/Styles/Fill.md) that paints the background track.

### BlockBorders
{: .no_toc }

The [**Borders**](/tB/Packages/CustomControls/Styles/Borders.md) drawn around the block.

### BlockCorners
{: .no_toc }

The [**Corners**](/tB/Packages/CustomControls/Styles/Corners.md) that controls the per-corner shape and radius of the block.

### BlockFill
{: .no_toc }

The [**Fill**](/tB/Packages/CustomControls/Styles/Fill.md) that paints the block.

### BlockWidth
{: .no_toc }

The width of the block, in pixels. [**PixelCount**](/tB/Packages/CustomControls/Enumerations/PixelCount.md). Default: 100. When [**Direction**](/tB/Packages/CustomControls/WaynesSlider/index.md#direction) is **Vertical**, this is the *height* of the block rather than its width; the block's other dimension takes the full available extent of the slider.

### TextRendering
{: .no_toc }

The [**TextRendering**](/tB/Packages/CustomControls/Styles/TextRendering.md) that controls how the optional [**DisplayFormat**](/tB/Packages/CustomControls/WaynesSlider/index.md#displayformat) text is rendered on the block.

## Methods

### InitializeDefaultValues
{: .no_toc }

Resets the state object to the package's defaults --- a solid mid-blue block fill, a 2-pixel black background border, and a transparent block border. Called automatically the first time the parent slider is initialized, if no serialized data was loaded.

Syntax: *object*.**InitializeDefaultValues**

## Events

### OnChanged
{: .no_toc }

Raised whenever any of the contained style objects raises its own **OnChanged**, or when [**BlockWidth**](#blockwidth) is assigned. The parent [**WaynesSlider**](/tB/Packages/CustomControls/WaynesSlider/index.md) listens for this and requests a repaint.
