Garry's Mod Wiki

Garry's Mod Wiki

Description

A basic label or "single line text area" that is non-editable. You might be looking for DLabel, which uses this panel internally.

Parent

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

Example

Creates a label and fills it with the text "Lua Labels!" parented to a simple frame.

local frame = vgui.Create( "DFrame" ) frame:SetSize( ScrW() * 0.25, ScrH() * 0.25 ) frame:Center() frame:MakePopup() frame.Label = vgui.Create( "Label", frame ) frame.Label:SetPos( 50, 50 ) frame.Label:SetText("Lua Labels!") frame.Label:SizeToContents()

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...