Panel.LoadControlsFromString

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:LoadControlsFromString( String string )
Description:
Creates and assigns properties of a panel through a string rather a filename, format is similar to the filename version
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.LoadControlsFromString]Panel.LoadControlsFromString [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis creates and defines a button
Used onNewerClient.png
Code
panel:LoadControlsFromString( [[
 
		"PanelPar"-- main panel name call all objects inside this
		{
 
			"Panel"-- panel object
			{
 
				"ControlName" "Panel" --internal panel name
				"fieldName" "name of field"
				"wide" "140"--width in pixels
				"tall" "140"--height in pixels
				"sizable" "0"-- 0 = cannot resize 1 = can resize
				"enabled" "1"-- 0 = panel can't be called 1 = panel is callable
                                "title" "title of panel"-- this text is drawn as a label in upper right coner if it is a window
 
			}
 
	          }
 
	]] )
OutputNone


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox