DMultiChoice.AddChoice

From GMod Wiki

Jump to: navigation, search
Function
Syntax DMultiChoice:AddChoice( String Text [,var Data]) )
Description:
Adds an option to a Multi Choice menu you can additionaly add a value that should be assosiated with the options name.
Returns: Integer ChoiceId
In Object: DMultiChoice
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DMultiChoice.AddChoice]DMultiChoice.AddChoice [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a option/choice in the list.
Used onNewerClient.png
Code
	 local List = vgui.Create("DMultiChoice", Frame );
	 List:AddChoice("Option 1")
	 List:AddChoice("Option 2")
 
OutputThis makes a simple multi choice with 2 options in it. "Option 1" and "Option 2"
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox