Panel.SizeToContents

From GMod Wiki

(Redirected from DPanelList.SizeToContents)
Jump to: navigation, search
Function
Syntax Panel:SizeToContents( )
Description:
Resizes the panel so that it's width and height fit all of the child controls inside.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.SizeToContents]Panel.SizeToContents [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionThis will size myLabel to the fit all text inside of it.
Used onNewerClient.png
Code
myLabel:SizeToContents()
OutputAll text inside myLabel won't be cut off due to insufficient size upon either x(line length) or y(new lines) axis.


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox