Garry's Mod Wiki

Garry's Mod Wiki

  Panel:Center()

Description

Centers the panel on its parent.

See Panel:CenterHorizontal and Panel:CenterVertical for more specialized functions.

This will center the panel using the current size of the panel, so it should be called AFTER setting or adjusting the size of the panel.

Take special care when using Panel:Dock as it will not update the size immediately.

You may want to use Panel:PerformLayout to set positions of child panels.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...