799 B
799 B
addItem
Adds a item into the list
Parameters:
stringThe entry namenumber|colorunique default background color - optionalnumber|colorunique default text color - optionalanyany value - you could access this later in a :onChange() event (you need to use :getValue()) - optional
Returns:
objectThe object in use
Usage:
- Creates a default menubar with 3 entries
local mainFrame = basalt.createFrame()
local aMenubar = mainFrame:addMenubar()
:addItem("1. Entry")
:addItem("2. Entry",colors.yellow)
:addItem("3. Entry",colors.yellow,colors.green)
<menubar>
<item><text>1. Entry</text></item>
<item><text>2. Entry</text><bg>yellow</bg></item>
<item><text>3. Entry</text><bg>yellow</bg><fg>green</fg></item>
</menubar>