Add-ons
Search…
ScrollController
Class (inherits from ContainerControl)

Methods

Overview
AddView
Expand
GetViews
Init

AddView(view As ViewController, index As Integer = -1)

Adds a View (dynamically at the Runtime) to the StackView.
Parameters
Name
Description
view
Pointer to the View which should be added to the StackView.
index
Position to add the View into the StackView.

Expand(value As Boolean)

Expand or collapse the StackController.
Parameters
Name
Description
value
A Boolean specifiying the state of the StackController.
Sample Code
PushButton1 Action-Event:
1
MyScrollController1.Expand(True)
Copied!

GetViews As ViewController()

Returns an Array of the StackViews Views.

Init(stackView As StackController, scrollBar As ScrollBar, animated As Boolean = True, UseNSScrollView As Boolean = False)

Creates a new ScrollContainer starting with the given Parameters. UseNSScrollView is optional.
Parameters
Name
Description
stackView
Pointer to the StackController.
scrollBar
Pointer to the ScrollBar.
animated
Set Animation of the StackController.
UseNSScrollView
Use NSScroller (macOS-only) If UseNSScrollView = True and you compile for Linux / Windows, the parameter will be ignored and the ScrollController uses the ScrollBar parameter.
Sample Code
MyScrollContainer1 Open-Event:
1
Var nsScroller As Boolean
2
3
#If TargetMacOS Then
4
// macOS-only
5
nsScroller = True
6
#Else
7
nsScroller = False
8
#Endif
9
10
Init(MyStackView1, ScrollBar1, True, nsScroller)
Copied!

RemoveView(index As Integer = -1)

Removes a View from the StackView.
Parameters
Name
Description
index
Removes the View at position index from the StackView.

Properties

Expanded As Boolean (read-only)

Returns the state of the StackController.

UseAnimation As Boolean

The animation state of the StackController.
The StackView Classes are able to shown within a NSScrollView. This feature is macOS-only and there is no guarantee that the feature will work in coming Versions of Apple’s macOS. StackView uses the XScrollView class of Jim McKay from piDog Software.
Last modified 1mo ago
Copy link