Garry's Mod Wiki

Panel:PositionLabel

  number Panel:PositionLabel( number lblWidth, number x, number y, Panel lbl, Panel panelObj )

Description

Sets the width and position of a DLabel and places the passed panel object directly to the right of it. Returns the y value of the bottom of the tallest object. The panel on which this method is run is not relevant; only the passed objects are affected.

Arguments

1 number lblWidth
The width to set the label to.
2 number x
The horizontal (x) position at which to place the label.
3 number y
The vertical (y) position at which to place the label.
4 Panel lbl
The label to resize and position.
5 Panel panelObj
The panel object to place to the right of the label.

Returns

1 number
The distance from the top of the parent panel to the bottom of the tallest object (the y position plus the height of the label or passed panel, depending on which is tallest).