A helper node for displaying scrollable elements (e.g. lists).
    public class ScrollContainer : Container

A ScrollContainer node with a Control child and scrollbar child (HScrollbar, VScrollBar, or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a Panel control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension).

Inheritance Chain

Constructors

    public ScrollContainer()

Signals

    "scroll_ended" ()

Emitted whenever scrolling stops.

    "scroll_started" ()

Emitted whenever scrolling is started.

Properties

    public int ScrollDeadzone { get; set; }

    public int ScrollHorizontal { get; set; }

The current horizontal scroll value.

    public bool ScrollHorizontalEnabled { get; set; }

If true, enables horizontal scrolling.

    public int ScrollVertical { get; set; }

The current horizontal scroll value.

    public bool ScrollVerticalEnabled { get; set; }

If true, enables vertical scrolling.

Methods

    public int GetDeadzone()

Getter for ScrollDeadzone

    public int GetHScroll()

Getter for ScrollHorizontal

    public int GetVScroll()

Getter for ScrollVertical

    public bool IsHScrollEnabled()

Getter for ScrollHorizontalEnabled

    public bool IsVScrollEnabled()

Getter for ScrollVerticalEnabled

    public void SetDeadzone(int deadzone)

Setter for ScrollDeadzone

    public void SetEnableHScroll(bool enable)

Setter for ScrollHorizontalEnabled

    public void SetEnableVScroll(bool enable)

Setter for ScrollVerticalEnabled

    public void SetHScroll(int value)

Setter for ScrollHorizontal

    public void SetVScroll(int value)

Setter for ScrollVertical

Tags: