DLabel/SetTextColor

From Garry's Mod
Jump to: navigation, search
 DLabel:SetTextColor( )

Contents

DescriptionPanelFunc

Sets the text color of the DLabel. This will take precedence over DLabel:SetTextStyleColor.

Arguments

table color

The text color. Uses the Color structure.

Examples

Example

Changes the text color to red.

local frame = vgui.Create( "DFrame" )
frame:SetTitle( "Text Color Example" )
frame:SetSize( 300, 100 )
frame:Center()
frame:MakePopup()

local frame_label = vgui.Create( "DLabel", frame )
frame_label:SetPos( 10, 30 )
frame_label:SetTextColor( Color( 255, 0, 0) )


Personal tools
Navigation