Revision Difference
DLabel:SetColor#513743
<function name="SetColor" parent="DLabel" type="panelfunc">⤶
<ispanel>yes</ispanel>⤶
<description>Changes color of label. Alias of <page>DLabel:SetTextColor</page>.</description>⤶
<realm>Client</realm>⤶
<args>⤶
<arg name="color" type="table">The color to set. Uses the Color structure.</arg>⤶
</args>⤶
</function>⤶
⤶
<example>⤶
<description>Creates a label and changes it color to red.</description>⤶
<code>⤶
local DLabel = vgui.Create( "DLabel" )⤶
DLabel:SetPos( 90, 50 )⤶
DLabel:SetColor(Color(255, 0, 0))⤶
DLabel:SetText( "Hello world." )⤶
DLabel:SizeToContents()⤶
</code>⤶
⤶
</example>