Garry's Mod Wiki

Panel:SizeToContentsX

void Panel:SizeToContentsX( number addVal = 0 )

Description

Resizes the panel object's width to accommodate all child objects/contents.

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

You must call this function AFTER setting text/font or adjusting child panels.

Arguments

1 number addVal = 0
The number of extra pixels to add to the width. Can be a negative number, to reduce the width.

Page Links


Special Pages


Wikis

?

Render Time: 34ms

Session 0
DB GetPage 4
Generate Html 1
SaveChanges 8
Render Body 0
Render Sidebar 12