reckfellENGINE

ScrollBar

Base scrollbar using Range numeric state.

On this page
class ScrollBarReckfellSharpInherits Range

Use HScrollBar or VScrollBar; automatic content scrolling normally calls for ScrollContainer. A standalone bar stores a number but does not move an arbitrary Control unless your code connects ValueChanged to it.

MinValue/MaxValue define the full range; Page is visible page size. The ordinary Value limit is MaxValue − Page: bounds 0…100 with Page = 20 end at 80. Page is not a wheel increment. Unlike base Range, the ScrollBar constructor sets Step = 0.

CustomStep defaults to -1: negative values use Step for arrow buttons and corresponding keys; nonnegative values supply their increment. It is neither Value snapping nor a universal increment for every scrolling method. With Step = 0 and negative CustomStep, those increments can be zero. The wheel uses Page / 8, or range / 16 when Page is zero, then respects Step and Range constraints.

ValueChanged is useful for ordinary value changes, including programmatic writes. Scrolling belongs to specific scrolling paths and is not emitted by ordinary Value assignment. SetValueNoSignal emits neither signal. Do not use Scrolling as a universal notification for every numeric change.

Range.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties1

CustomStepProperty
# CustomStep
C#
public float CustomStep { get; set; }

Arrow-button and corresponding key increment; default -1 uses Step. Nonnegative values supply an increment; 0 can leave the number unchanged. Does not control wheel increments or snap programmatic Value writes.

Methods2

GetCustomStepfloat
# GetCustomStep
C#
public float GetCustomStep();

Arrow-button and corresponding key increment; default -1 uses Step. Nonnegative values supply an increment; 0 can leave the number unchanged. Does not control wheel increments or snap programmatic Value writes.

Returns float

Stored float increment; a negative value means use Step.

SetCustomStepvoid
# SetCustomStep
C#
public void SetCustomStep(float step);

Arrow-button and corresponding key increment; default -1 uses Step. Nonnegative values supply an increment; 0 can leave the number unchanged. Does not control wheel increments or snap programmatic Value writes.

Parameters
NameTypeDefault
stepfloat—
step

Arrow-button and corresponding key increment; default -1 uses Step. Nonnegative values supply an increment; 0 can leave the number unchanged. Does not control wheel increments or snap programmatic Value writes.

Signals and events1

ScrollingEvent
# Scrolling
C#
public event Action Scrolling;

Signal for specific user-scrolling paths rather than every Range change. Ordinary Value assignment and SetValueNoSignal do not emit it. Use ValueChanged for ordinary numeric reactions.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
icon_max_size
int

The maximum allowed size of the ScrollBar's increment and decrement icons. The texture is scaled down so its widest axis is ScrollBar.icon_max_size and the other axis is scaled keeping the original ratio.

Default: 0
decrement
Texture2D

Icon used as a button to scroll the ScrollBar left/up. Supports custom step using the ScrollBar.CustomStep property.

decrement_highlight
Texture2D

Displayed when the mouse cursor hovers over the decrement button.

decrement_pressed
Texture2D

Displayed when the decrement button is being pressed.

increment
Texture2D

Icon used as a button to scroll the ScrollBar right/down. Supports custom step using the ScrollBar.CustomStep property.

increment_highlight
Texture2D

Displayed when the mouse cursor hovers over the increment button.

increment_pressed
Texture2D

Displayed when the increment button is being pressed.

drag_ended_sound
AudioStream

Played when mouse or touch drag ends.

drag_started_sound
AudioStream

Played when mouse or touch drag begins.

value_change_rejected_sound
AudioStream

Played when the value is attempted to be changed through keyboard or gamepad input, but the value is already at the minimum (or maximum).

value_changed_sound
AudioStream

Played when the value is changed through keyboard or gamepad input. If the value is already at the minimum (or maximum), ScrollBar.value_change_rejected_sound is played instead.

grabber
StyleBox

Used as texture for the grabber, the draggable element representing current scroll.

grabber_highlight
StyleBox

Used when the mouse hovers over the grabber.

grabber_pressed
StyleBox

Used when the grabber is being dragged.

scroll
StyleBox

Used as background of this ScrollBar.

scroll_focus
StyleBox

Used as background when the ScrollBar has the GUI focus.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.