DComboBox.SelectByName

From GMod Wiki

Jump to: navigation, search

Examples

DescriptionCreates a list of options and then selects the first.
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" )
TestingComboBox:SelectByName( "Add" )
 
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox