Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VerticalBox

A widget that contains other widgets and orders its children vertically

Hierarchy

Index

Methods

addChild

getChildAt

  • getChildAt(index: number): Widget | undefined
  • Return the child widget at the given index. Returns undefined if no child exists at the index.

    Parameters

    • index: number

      Index where to get the child widget

    Returns Widget | undefined

getOwningObject

getParent

  • getParent(): Widget | undefined
  • Return the widget that contains this widget, for example a border that wraps a check box. Returns undefined if this object has no parent.

    Returns Widget | undefined

insertChild

  • Insert a child widget at the given index. Inserts at the end if the index is not valid.

    Parameters

    • child: Widget

      The widget to insert

    • index: number

      Index at which to insert the new child

    Returns Panel

isEnabled

  • isEnabled(): boolean

removeChild

  • removeChild(child: Widget): void

removeChildAt

  • removeChildAt(index: number): void
  • Remove the child at the given index

    Parameters

    • index: number

      Index where to remove the child widget

    Returns void

setChildDistance

  • setChildDistance(distance: number): Panel

setEnabled

  • setEnabled(enabled: boolean): Widget
  • Set whether the widget is enabled. When a widget is disabled, users can't interact with it and it is greyed out. When a widget that contains other widgets (like VerticalBox) is disabled, all its children behave as if disabled, too. By default, widgets are enabled.

    Parameters

    • enabled: boolean

      Whether to enable the widget.

    Returns Widget

setEqualChildSize

  • setEqualChildSize(equal: boolean): Panel
  • Set if the size of each widget should be equal instead of each widget using its default size.

    Parameters

    • equal: boolean

      Should widget sizes be equal? Default: false

    Returns Panel