From GMod Wiki
|
Function |
|
Syntax |
Panel:Label( String ) |
|
Description: |
|
A basic label or "single line text area" that is non-editable. |
|
Returns: |
nil |
|
In Object: |
Panel |
|
Realm: |
 |
|
BBCode Link: |
[b][url=http://wiki.garrysmod.com/?title=P.Label]P.Label [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Usage
Easy label for use on any frame.
| Description | Creates a label and fills it with the text "Lua is alive!" parented to a simple frame. |
| Used on |  |
| Code |
local frame = vgui.Create("Frame")
frame.Label1 = vgui.Create("Label", frame)
frame.Label1:SetPos(50,50)
frame.Label1:SetText("Lua is alive!")
frame.Label1:SizeToContents()
frame:SetSize( ScrW()*0.25, ScrH()*0.25 )
frame:Center()
frame:SetVisible( true )
frame:MakePopup()
|
| Output | N/A |