Add-ons
Search…
How to use it

Create Views

  • Add a Container Control to your Contents (Insert > Container Control)
  • Set Name to MyView and Super to ViewController
  • Insert Open-Event Handler (Insert > Event Handler...) and initialize MyView:
1
// 50 = collapsed Height
2
// 250 = expanded Height
3
Init(50, 250)
Copied!
  • Drag and Drop some Controls you want to MyView
  • Drag and Drop a DisclosureTriangle and add this Code to his Action-Event:
1
Expand(Not Expanded)
Copied!

Create Stack

  • Add a Container Control to your Contents (Insert > Container Control)
  • Set Name to MyStackView and Super to StackController
  • Drag and Drop all Views (you created in step before) into MyStackView
  • Insert Open-Event Handler (Insert > Event-Handler...) and initialize MyStackView:
1
// do this for each View you droped into MyStackView
2
Views.Add(MyView1)
3
Views.Add(MyOtherView1)
Copied!

Create Scroll Container

  • Add a Container Control to your Contents (Insert > Container Control)
  • Set Name to MyScrollView
  • Set Super to ScrollController
  • Drag and Drop a ScrollBar into MyScrollView
  • Drag and Drop MyStackView into MyScrollView (you don't need to set the position for your controls)
  • Insert Open-Event Handler (Insert > Event Handler...) and initialize MyScrollView:
1
Var nsScroller As Boolean
2
3
#If TargetMacOS Then
4
// Or within a native NSScrollView (macOS-only)
5
nsScroller = True
6
#Else
7
// With regular Xojo ScrollBar (macOS, Linux, Windows)
8
nsScroller = False
9
#Endif
10
11
Init(MyStackView1, ScrollBar1, True, nsScroller)
Copied!

Use it within your App

  1. 1.
    Drag and Drop MyScrollView into your Window
  2. 2.
    Press Run or Compile
  3. 3.
    Finished
Last modified 3d ago