DMultiChoice.ChooseOption
From GMod Wiki
Function | |
Syntax | Panel:ChooseOption( String Option text, Number index ID ) |
Description: | |
Selects an option from the list by its text and ID | |
Returns: | nil |
In Object: | DMultiChoice |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=DMultiChoice.ChooseOption]DMultiChoice.ChooseOption [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | This will get the "pork" option at index 2 in myPanel |
---|---|
Used on | |
Code | myPanel:ChooseOption( "pork", 2 ) |
Output | Selects the "pork" option at index 2 in myPanel and sets it in the text. |
Additional Notes
- Giving a arguments that do not exist will set the text to it, but not create it and add to the list.
- This also calls the DMultiChoice.OnSelect function automatically.