Garry's Mod Wiki

DFrame:Center

  DFrame:Center()

Description

Centers the frame relative to the whole screen and invalidates its layout. This overrides Panel:Center.

You must use Panel:SetSize before using this function.