Panel.SetFGColour

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:SetFGColour( Color color )
Description:
Sets foreground color in the control.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.SetFGColour]Panel.SetFGColour [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionSets the text color of the richtext control.
Used onNewerClient.png
Code
local richTextExample = vgui.Create("RichText", mainChat)
richTextExample:SetPos(5, 25)
richTextExample:SetSize(500, 500)
richTextExample:SetText("Something here")
richTextExample:SetFGColour(Color(255,0,0,255))
OutputA RichText box with a red text that says "Something here"


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox