Garry's Mod Wiki



Underlined link label without a DoClick function. When a valid URL is set and the label is clicked, it will open a browser window and navigate to the address.

This panel uses gui.OpenURL internally and its restrictions apply.


Derives methods, etc not listed on this page from URLLabel.


table DLabelURL:GetColor()
Gets the current text color of the DLabelURL. Alias as DLabelURL:GetTextColor.
table DLabelURL:GetTextColor()
Gets the current text color of the DLabelURL set by DLabelURL:SetTextColor.
table DLabelURL:GetTextStyleColor()
Returns the color set by DLabelURL:SetTextStyleColor.
DLabelURL:SetColor( table col )
Alias of DLabelURL:SetTextColor.
DLabelURL:SetTextColor( table col )
Sets the text color of the DLabelURL. Overrides DLabelURL:SetTextStyleColor. This should only be used immediately after it is created, and otherwise Panel:SetFGColor.
DLabelURL:SetTextStyleColor( table color )
Sets the base text color of the DLabelURL. This is overridden by DLabelURL:SetTextColor.


Creates a DLabelURL that opens the wiki when clicked.

local frame = vgui.Create( "DFrame" ) frame:SetSize(400,400) frame:SetTitle("Test panel") frame:Center() frame:MakePopup() local lbl = vgui.Create( "DLabelURL", frame ) lbl:SetPos(50, 50) lbl:SetSize(100, 50) lbl:SetColor(Color(255,255,255,255)) lbl:SetText("I Love Gmod") lbl:SetURL("")