Garry's Mod Wiki

Label

Label

  Panel Label( string text, Panel parent = nil )

Description

Convenience function that creates a DLabel, sets the text, and returns it

Arguments

1 string text
The string to set the label's text to
2 Panel parent = nil
Optional. The panel to parent the DLabel to

Returns

1 Panel
The created DLabel

Example

Create a label

local lbl = Label( "The quick brown fox" )

Example

Create a label and parents it to a DPanel

local pnl = vgui.Create("DPanel") local lbl = Label( "The quick brown fox", pnl )

Special Pages


Wikis

?

Render Time: 23ms

DB GetPage 2
Generate Html 7
SaveChanges (1) 5
Render Body 0
Render Sidebar 6