Panel.SetText

From GMod Wiki

(Redirected from DTree Node.SetText)
Jump to: navigation, search
Function
Syntax Panel:SetText( String text )
Description:
Sets the text in the control.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.SetText]Panel.SetText [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionSets the text of a text based element.
Used onNewerClient.png
Code
function TextPanel()
 
local TextPanel = vgui.Create( "Frame" )
TextPanel:SetSize( 400, 50 )
 
local Text = vgui.Create( "Label", TextPanel )
Text:SetText( "This here is some real exciting text!" )
Text:SizeToContents() 
Text:SetPos( 16 , 16 )
 
end
OutputA frame with a Label that reads "This here is some real exciting text!"


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox