Panel/SizeToContents

From Garry's Mod
Jump to: navigation, search
 Panel:SizeToContents( )

Description

Resizes the panel so that its width and height fit all of the content inside.

NOTE

Only works on Label derived panels such as DLabel by default, and on any panel that manually implemented the Panel:SizeToContents method, such as DNumberWang and DImage.

WARNING

You must call this function AFTER setting text/font, adjusting child panels or otherwise altering the panel.

Personal tools
Navigation