Garry's Mod Wiki

DSizeToContents

Description

A helper panel that will automatically resize itself to fit all its children using Panel:SizeToChildren.

View source

Parent

Derives methods, etc not listed on this page from Panel.

Implements

Implements or overrides the following hooks/methods. If you want to override these, you probably want to call the original function too.

Methods

boolean DSizeToContents:GetSizeX()
Returns whether the DSizeToContents panel should size to contents horizontally.
boolean DSizeToContents:GetSizeY()
Returns whether the DSizeToContents panel should size to contents vertically.
DSizeToContents:SetSizeX( boolean sizeX )
Sets whether the DSizeToContents panel should size to contents horizontally. This is true by default.
DSizeToContents:SetSizeY( boolean sizeY )
Sets whether the DSizeToContents panel should size to contents vertically. This is true by default.