DComboBox.SetSelected

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
local TheFirstItem = TestingComboBox:AddItem( "Add" ) -- Add our options
TestingComboBox:AddItem( "Some" )
TestingComboBox:AddItem( "Options" )
TestingComboBox:AddItem( "Here" )
TheFirstItem:SetSelected(true)
 
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox