vgui.Create
From GMod Wiki
| Function | |
| Syntax |
vgui.Create( String panelType, Panel parent, String targetName ) Where is this used? |
| Description: | |
| Creates & returns a panel, which is parented to parent(Optional), with the targetname targetName(Optional). | |
| Returns: | Panel |
| Part of Library: | vgui |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Vgui.Create]Vgui.Create [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Create a very simple VGUI frame. |
|---|---|
| Used on | |
| Code | local frame = vgui.Create("Frame") frame:SetName("HelloWorldFrame") |
| Output | Creates a frame. |
Additional Notes
- Parent and targetname are optional.
- Parent defaults to the world panel.
- Targetname defaults to nothing.
- Targetname can be read with Panel.GetName.
- The panel is spawned visible by default.