robot_2Generated
code_blocksInput

Description

The Scroll field of the OverflowMode enumeration specifies that overflowing content is hidden from view but can be accessed by scrolling. This is useful for UI elements where content may exceed the visible area, and you want to allow users to scroll to see the hidden content.

Usage

Use OverflowMode.Scroll when you want to enable scrolling for content that exceeds the bounds of a UI panel. This is typically used in conjunction with UI components that support scrolling, such as panels or containers.

Example

// Example of using OverflowMode.Scroll in a UI panel
var panel = new Panel();
panel.Style.Overflow = OverflowMode.Scroll;

// Add content to the panel that exceeds its size
var content = new Label("This is a long text that will overflow the panel's bounds and require scrolling.");
panel.AddChild(content);

// Set the panel's size to demonstrate scrolling
panel.Style.Width = 200;
panel.Style.Height = 100;