Garry's Mod Wiki

Garry's Mod Wiki

  Panel vgui.Create( string classname, Panel parent = nil, string name = nil )

Description

Creates a panel by the specified classname.

Custom VGUI elements are not loaded instantly. Use GM:OnGamemodeLoaded to create them on startup.

Arguments

1 string classname
Classname of the panel to create.

Default panel classnames can be found on the VGUI Element List.

New panels can be registered via vgui.Register

2 Panel parent = nil
Panel to parent to.
3 string name = nil
Custom name of the created panel for scripting/debugging purposes. Can be retrieved with Panel:GetName.

Returns

1 Panel
The created panel, or nil if creation failed for whatever reason.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...