Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Border

A colored border (and background) around another widget

Hierarchy

Index

Methods

getChild

  • getChild(): Widget | undefined
  • Return the child widget. Returns undefined if no child has been set for this border

    Returns Widget | undefined

getColor

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

isEnabled

  • isEnabled(): boolean

isVisible

  • isVisible(): boolean

setChild

  • Set the child widget. You can pass undefined to remove an existing child widget.

    Parameters

    Returns Border

setColor

  • setColor(color: Color | [r: number, g: number, b: number, a: number]): Border
  • Set the background color of the border

    Parameters

    • color: Color | [r: number, g: number, b: number, a: number]

    Returns Border

setEnabled

  • setEnabled(enabled: boolean): this
  • 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 this

setVisible

  • setVisible(visible: boolean): Widget
  • Set whether the widget is visible. When a widget that contains other widgets (like VerticalBox) is invisible, all its children are invisible, too. The layout of widgets is updated when visibility changes, and invisible widgets are treated as if they don't exist.

    Parameters

    • visible: boolean

      Whether the widget is visible.

    Returns Widget