Revision Difference
Label#562605
<panel>
<name>Label</name>
<parent>Panel</parent>
<realm>Client</realm>
<description>
A basic label or "single line text area" that is non-editable. You might be looking for <page>DLabel</page>.
A basic label or "single line text area" that is non-editable. You might be looking for <page>DLabel</page>, which uses this panel internally.
</description>
</panel>
<example>
<description>Creates a label and fills it with the text "Lua Labels!" parented to a simple frame.</description>
<code>
local frame = vgui.Create( "DFrame" )
frame:SetSize( ScrW() * 0.25, ScrH() * 0.25 )
frame:Center()
frame:MakePopup()
frame.Label = vgui.Create( "Label", frame )
frame.Label:SetPos( 50, 50 )
frame.Label:SetText("Lua Labels!")
frame.Label:SizeToContents()
</code>
</example>