DComboBox.AddItem

From GMod Wiki

Jump to: navigation, search
Function
Syntax DComboBox.AddItem( String Item )
Description:
Add an item to your combo box.
Returns: nil
In Object: DComboBox
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DComboBox.AddItem]DComboBox.AddItem [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionCreates a combo box and adds 4 selections .
Used onNewerClient.png
Code
 
local TestingComboBox = vgui.Create( "DComboBox", FrameParent )
TestingComboBox:SetPos( 10, 35 )
TestingComboBox:SetSize( 100, 185 )
TestingComboBox:SetMultiple( false ) -- Don't use this unless you know extensive knowledge about tables
TestingComboBox:AddItem( "Add" ) -- Add our options
TestingComboBox:AddItem( "Some" )
TestingComboBox:AddItem( "Options" )
TestingComboBox:AddItem( "Here" )
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox