Garry's Mod Wiki

Panel:SizeToContents

Panel:SizeToContents

  Panel:SizeToContents()

Description

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

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.
You must call this function AFTER setting text/font, adjusting child panels or otherwise altering the panel.

Special Pages


Wikis

?

Render Time: 40ms

DB GetPage 21
Generate Html 3
SaveChanges (1) 6
Render Body 0
Render Sidebar 7