Garry's Mod Wiki


DTextEntry:SetCursorColor( table color )


Sets the cursor's color in DTextEntry (the blinking line).


1 table color
The color to set the cursor to.


Creates a panel and a DTextEntry, and then sets the cursor color. (As seen on

local ParentPanel = vgui.Create("DFrame") ParentPanel:SetSize(ScrW()/7, ScrH()/12) ParentPanel:Center() ParentPanel:SetTitle("Cursor Color Test") ParentPanel:SetDeleteOnClose(true) ParentPanel:MakePopup() local TextEntry = vgui.Create( "DTextEntry", ParentPanel ) TextEntry:SetSize(ScrW()/9, ScrH()/30) TextEntry:SetValue("Cursor Color Test ") TextEntry:SetPos(ParentPanel:GetWide()/2-TextEntry:GetWide()/2, ParentPanel:GetTall()/2-TextEntry:GetTall()/5) TextEntry:SetEnterAllowed(false) -- Uses Simple RGBA (Red, Green, Blue, Alpha) Colors. -- TextEntry:SetCursorColor(Color(255,0,0,255)) TextEntry:RequestFocus()
Output: Makes the text entry's cursor color red.

Page Links

Special Pages



Render Time: 33ms

DB GetPage 6
Generate Html 2
SaveChanges (1) 10
Render Body 0
Render Sidebar 12