Garry's Mod Wiki

Panel:SetMinimumSize

  Panel:SetMinimumSize( number minW = nil, number minH = nil )

Description

Sets the minimum dimensions of the panel or object.

You can restrict either or both values.

Calling the function without arguments will remove the minimum size.

Arguments

1 number minW = nil
The minimum width of the object.
2 number minH = nil
The minimum height of the object.

Example

Restricting height but not width

local frame = vgui.Create( "DFrame" ) frame:SetSize( 800, 600 ) frame:SetSizable( true ) frame:SetMinimumSize( nil, 300 ) frame:MakePopup()