Revision Difference
Global.Label#514896
<function name="Label" parent="Global" type="libraryfunc">⤶
<description>Convenience function that creates a DLabel, sets the text, and returns it</description>⤶
<realm>Client and Menu</realm>⤶
<args>⤶
<arg name="text" type="string">The string to set the label's text to</arg>⤶
<arg name="parent" type="Panel" default="nil">Optional. The panel to parent the DLabel to</arg>⤶
</args>⤶
<rets>⤶
<ret name="" type="Panel">The created DLabel</ret>⤶
</rets>⤶
</function>⤶
⤶
<example>⤶
<description>Create a label</description>⤶
<code>local lbl = Label( "The quick brown fox" )</code>⤶
⤶
</example>⤶
⤶
⤶
<example>⤶
<description>Create a label and parents it to a DPanel</description>⤶
<code>⤶
local pnl = vgui.Create("DPanel")⤶
local lbl = Label( "The quick brown fox", pnl )⤶
</code>⤶
⤶
</example>