Customization > Automation Interface > Functions > For User Interface > Functions for diagrams > SetScrollOption function (automation interface)
SetScrollOption function (automation interface)
Syntax:
SetScrollOption(<option>)
Where:
<option> is a numeric value that specifies how the view scrolls. The available options are as follows:
0
no scrolling
1
Scroll to top left of the window
2
Scroll to bottom left of the window
3
Scroll to center of the window
4
Scroll to top right of the window
5
Scroll to bottom right of the window
6
Scroll to center left of the window
The SetScrollOption function controls the diagram view. By default, if a diagram does not fit within your window, the window scrolls to center symbols selected by the SelectSymbol and SelectSymbol2 functions . You can decide where to place the selected symbol in your window by calling SetScrollOption before SelectSymbol and SelectSymbol2.
Examples
In this example, the diagram scrolls to the center left:
Studio.SetScrollOption(6)
Was this helpful?