Add-ons
  • Welcome
  • StackView
    • Version 2
      • How it works
      • How to use it
      • The Details
        • ScrollController
        • StackController
        • ViewController
      • Tips & Tricks
      • General Information
    • Version 3
      • How it works
      • How to use it
      • The Details
        • ScrollController
        • StackController
        • ViewController
      • Tips & Tricks
      • General Information
    • Changelogs
    • Purchase
  • FTC Word-Exporter
    • How to use it
    • General Information
  • CSTrueColors
    • Documentation
      • NSColorAddition
      • AppKitAddition
        • VisualEffectView
      • User32Addition
      • Template Images
      • The Demo Project
    • Changelog
  • Android
  • Open Source Projects
    • Android Design Extensions
  • Xojo Language Guide
    • The Basics
Powered by GitBook
On this page
  • Create Views
  • Create Stack
  • Create Scroll Container
  • Use it within your App
  1. StackView
  2. Version 3

How to use it

PreviousHow it worksNextThe Details

Last updated 1 year ago

Create Views

  • Add a DesktopContainer Control to your Contents (Insert > Container)

  • Set Name to MyView and Super to

  • Insert Opening-Event Handler (Insert > Event Handler...) and initialize MyView:

Opening-Event
// 50  = collapsed Height
// 250 = expanded Height
Init(50, 250)
  • Drag and Drop some Controls you want to MyView

  • Drag and Drop a DesktopDisclosureTriangle and add this Code to his ValueChanged-Event:

ValueChanged-Event
Expand(Not Expanded)

Create Stack

  • Add a DesktopContainer Control to your Contents (Insert > Container)

  • Set Name to MyStackView and Super to

  • Drag and Drop all Views (you created in step before) into MyStackView

Optional if you have set the AutoSetup designtime-only property to False.

  • Insert Opening-Event Handler (Insert > Event-Handler...) and initialize MyStackView:

Opening-Event
If Not Self.AutoSetup Then
  // do this for each View you droped into MyStackView
  Views.Add(MyView1)
  Views.Add(MyOtherView1)
End If

Create Scroll Container

  • Add a DesktopContainer Control to your Contents (Insert > Container)

  • Set Name to MyScrollView

  • Drag and Drop MyStackView into MyScrollView (you don't need to set the position for your controls)

Optional if you have set the AutoSetup designtime-only property to False.

  • Insert Opening-Event Handler (Insert > Event Handler...) and initialize MyScrollView:

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

Use it within your App

  1. Drag and Drop MyScrollView into your Window

  2. Press Run or Compile

  3. Finished

Set Super to

ViewController
StackController
ScrollController
Page cover image