Panel.SetFont

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:SetFont( String font )
Description:
Sets the font of all text on the panel.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.SetFont]Panel.SetFont [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionSet's the font.
Used onLabels, TextEntry & Buttons.
Code
 
local label = vgui.Create("DLabel")
label:SetText("Hello")
label:SetPos(5,5)
label:SetFont("defaultbold")
label:SizeToContents()
 
Output"Hello" in the font "defaultbold"


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox