Garry's Mod Wiki

Garry's Mod Wiki

  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 )

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 four times a day. Edits and history are not available.

Last Parsed: Loading...