Garry's Mod Wiki

DTextEntry:SetTextColor

  DTextEntry:SetTextColor( table color )

Description

Sets the text color of the DTextEntry.

Arguments

1 table color
The text color. Uses the Color.

Example

Changes the text color inside the DTextEntry to the color red.

local Frame = vgui.Create("DFrame") Frame:SetSize(200,200) Frame:Center() Frame:MakePopup() local TextEntry = vgui.Create("DTextEntry", Frame) TextEntry:SetSize(180,20) TextEntry:SetPos(10,80) TextEntry:SetTextColor(Color(255,20,20)) TextEntry:SetValue("Basic Text")