Panel.PostMessage
From GMod Wiki
Function | |
Syntax | Panel:PostMessage( String messageType, String dataType, Var data ) |
Description: | |
Posts a message to VGUI. This is a direct way of instructing a panel to do something. | |
Returns: | nil |
In Object: | Panel |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Panel.PostMessage]Panel.PostMessage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Tell a slider to set itself to 30. |
---|---|
Used on | |
Code | vgui.Create("") slider:PostMessage("SetValue","f",30) |
Output | False |
Description | Change the title of frame. |
---|---|
Used on | |
Code | frame:PostMessage( "SetTitle", "text", "cLabel Test" ) |
Output | N/A |
Additional Notes
- Datatype should correspond to the type of data you are passing to PostMessage:
- "b" = boolean
- "f" = float
- "text" = string