Description
The VerticalScrollbar
property of the Editor.GraphicsView
class determines the visibility and behavior of the vertical scrollbar within the graphics view. It is of type Editor.ScrollbarMode
, which allows you to specify how the scrollbar should be displayed and interact with the user.
Usage
To use the VerticalScrollbar
property, you can get or set its value to control the vertical scrollbar's mode. The available modes are defined in the Editor.ScrollbarMode
enumeration, which typically includes options such as AlwaysOff
, AlwaysOn
, and Auto
.
For example, setting the VerticalScrollbar
to Editor.ScrollbarMode.Auto
will make the scrollbar appear only when the content exceeds the view's vertical bounds.
Example
// Example of setting the VerticalScrollbar property
GraphicsView graphicsView = new GraphicsView();
graphicsView.VerticalScrollbar = Editor.ScrollbarMode.Auto;
// Check the current mode of the vertical scrollbar
Editor.ScrollbarMode currentMode = graphicsView.VerticalScrollbar;
if (currentMode == Editor.ScrollbarMode.AlwaysOn)
{
// Perform actions if the scrollbar is always visible
}