Garry's Mod Wiki

Revision Difference

Panel:SizeToContentsX#560794

<function name="SizeToContentsX" parent="Panel" type="classfunc"> <file line="342-L349">lua/includes/extensions/client/panel.lua</file>⤶ <description> Resizes the panel object's width to accommodate all child objects/contents. Only works on <page>Label</page> derived panels such as <page>DLabel</page> by default, and on any panel that manually implemented <page>Panel:GetContentSize</page> method. <note>You must call this function **AFTER** setting text/font or adjusting child panels.</note> </description> <realm>Client and Menu</realm> <args> <arg name="addVal" type="number" default="0">The number of extra pixels to add to the width. Can be a negative number, to reduce the width.</arg> </args> </function>