File Control/Dropdown.lua

DropDown Control Registration and Methods

Functions

GetValueInfo (self, value, menuList) Get the first info table in the menuList with the specified value.
Portfolio.Control.DropDown.InitChecked (self, menuList) Recursively initialize the menuList 'checked' functions.
Portfolio.Control.DropDown.InitFunc (self, menuList) Recursively initialize the menuList 'func' functions.
UpdateText (self) Update the control text from control.text.

Tables

Portfolio.Control.DropDown DropDown Control Registration and Methods


Functions

GetValueInfo (self, value, menuList)
Get the first info table in the menuList with the specified value.

Parameters

  • self: dropdown control
  • value: [optional] value, defauts to the current value
  • menuList: (table) [optional] menu list, defauts to control.rootMenuList

Usage:

control:GetValueInfo([value[, menuList] ])

Return value:

(table) dropdown button info table
Portfolio.Control.DropDown.InitChecked (self, menuList)
Recursively initialize the menuList 'checked' functions. They will show a check if the value of the menuItem matches control:GetValue() Called on control construction.

Parameters

  • self: dropdown control
  • menuList: (table) [optional] menu list, defauts to control.rootMenuList

Usage:

control:InitChecked([menuList])
Portfolio.Control.DropDown.InitFunc (self, menuList)
Recursively initialize the menuList 'func' functions. When the menu item is selected it will call control:SetValue(menuItem.value, true), and close the parent menus. Called on control construction.

Parameters

  • self: dropdown control
  • menuList: (table) [optional] menu list, defauts to control.rootMenuList

Usage:

control:InitFunc([menuList])
UpdateText (self)
Update the control text from control.text. Also calls control:UpdateHeaderText() and updates the width of the dropdown to fit the text or control.minWidth

Parameters

  • self: dropdown control

Usage:

control:UpdateText()

Tables

Portfolio.Control.DropDown
DropDown Control Registration and Methods

Valid XHTML 1.0!