Garry's Mod Wiki

Panel:GetContentAlignment

  number Panel:GetContentAlignment()

Recently Added

This was recently added in version (2025.04.03). It might only be available on the Dev Branch right now.

Description

Returns the alignment of the text of a Label.

This function only works on Label panels and its derivatives.

Returns

1 number alignment
The direction of the content, based on the number pad.

1: bottom-left
2: bottom-center
3: bottom-right
4: middle-left
5: center
6: middle-right
7: top-left
8: top-center
9: top-right