Garry's Mod Wiki

Revision Difference

vgui.CreateFromTable#549701

<function name="CreateFromTable" parent="vgui" type="libraryfunc"> <description>Creates a panel from table. Typically used with <page>vgui.RegisterFile</page> and <page>vgui.RegisterTable</page>.</description> <realm>Client and Menu</realm> <file line="50-69">lua/includes/extensions/client/panel/scriptedpanels.lua</file> <file line="54-L73">lua/includes/extensions/client/panel/scriptedpanels.lua</file> <args> <arg name="metatable" type="table">Your PANEL table.</arg> <arg name="parent" type="Panel" default="nil">Which panel to parent the newly created panel to.</arg> <arg name="name" type="string" default="nil">Custom name of the created panel for scripting/debugging purposes. Can be retrieved with <page>Panel:GetName</page>.</arg> </args> <rets> <ret name="" type="Panel">The created panel, or `nil` if creation failed for whatever reason.</ret> </rets> </function>