Module controls.layoutpanel

LayoutPanel module

Functions

LayoutPanel:SetOrientation (orientation) Set the panel's orientation
LayoutPanel:ToggleItem (itemIdx) Toggle item selection
LayoutPanel:SelectItem (itemIdx, append) Select the item
LayoutPanel:DeselectItem (itemIdx) Deselect item
LayoutPanel:SelectAll () Select all items
LayoutPanel:DeselectAll () Deselect all items

Tables

LayoutPanel LayoutPanel fields.


Functions

LayoutPanel:SetOrientation (orientation)
Set the panel's orientation

Parameters:

  • orientation string new orientation
LayoutPanel:ToggleItem (itemIdx)
Toggle item selection

Parameters:

  • itemIdx int id of the item for which the selection will be toggled
LayoutPanel:SelectItem (itemIdx, append)
Select the item

Parameters:

  • itemIdx int id of the item to be selected
  • append bool whether the old selection should be kept
LayoutPanel:DeselectItem (itemIdx)
Deselect item

Parameters:

  • itemIdx int id of the item to deselect
LayoutPanel:SelectAll ()
Select all items
LayoutPanel:DeselectAll ()
Deselect all items

Tables

LayoutPanel
LayoutPanel fields. Inherits from Control.

Fields:

  • itemPadding {left,top,right,bottom} table of item padding, (default {5,5,5,5})
  • itemMargin {left,top,right,bottom} table of item margin, (default {5,5,5,5})
  • minWidth int minimum item width (default 1)
  • maxWidth int maximum item width (default 0)
  • minHeight int minimum item height (default 1)
  • maxHeight int maximum item height (default 0)
  • orientation string orientation of the items (default "horizontal)
  • resizeItems bool items are resized (default false)
  • centerItems bool items are centered (default true)
  • selectable bool items can be selected (default false)
  • multiSelect bool multiple items can be selected
  • OnSelectItem {func1,func2,...} function listeners to be called on item selection change (default {})
  • OnDrawItem {func1,func2,...} function listeners to be called when an item is drawn (default {})
  • OnDblClickItem (func1,func2,...} function listeners to be called on double click (default {})

See also:

generated by LDoc 1.4.0