ScrollController

Class (inherits from DesktopContainer)

Methods

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

Adds a View (dynamically at the Runtime) to the StackView.

Parameters

NameDatatypeDescription

view

Pointer to the View which should be added to the StackView.

index

Integer = -1

Position to add the View into the StackView.

Expand(value As Boolean)

Expand or collapse the StackController.

Parameters

NameDatatypeDescription

value

A Boolean specifiying the state of the StackController.

Sample Code

Button1 Pressed-Event:

Pressed-Event
MyScrollController1.Expand(True)

GetViews As ViewController()

Returns an Array of the StackViews Views.

Init(stackView As StackController, useAnimation As Boolean = True)

Creates a new ScrollContainer starting with the given Parameters.

Parameters

NameDatatypeDescription

stackView

Pointer to the StackController.

useAnimation

Boolean = True

Set Animation of the StackController.

Sample Code

MyScrollContainer1 Opening-Event:

Opening-Event
If Not Self.AutoSetup Then
  Init(MyStackView1)
End If

RemoveView(index As Integer = - 1)

Removes a View from the StackView.

Parameters

NameDescription

index

Integer = -1

Removes the View at position index from the StackView.

Properties

AutoSetup As Boolean (designtime-only)

Automatically adds the StackController contained in the ScrollController. Otherwise, you must add the StackController manually via Init in the Opening -Event.

If AutoSetup = True, the views are arranged according to their DesktopContainer.TabIndex set in the Xojo IDE.

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 updated