DComboBox.SetSelectedItems

From GMod Wiki

Jump to: navigation, search
Function
Syntax DComboBox:SetSelectedItems( Table Panel Table )
Description:
Set table of the selected items in the combo box.
Returns: nil
In Object: DComboBox
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DComboBox.SetSelectedItems]DComboBox.SetSelectedItems [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionN/A
Used onNewerClient.png
Code
	 local Box = vgui.Create("DComboBox", Frame )
	    item1 = Box:AddItem( "Glass of Tea" )
	    item2 = Box:AddItem( "Some Random Animal" )
            item3 =Box:AddItem( "Another Item Here" )
            item4 =Box:SelectByName( "Glass of Tea" )
 
             Box:SetSelectedItems({item1})
             item1:SetSelected(true)
 
 
Output
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox