DFrame/SetSizable

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
Line 10: Line 10:
 
|name=sizeable
 
|name=sizeable
 
|desc=Whether the frame should be resizeable or not.
 
|desc=Whether the frame should be resizeable or not.
 +
}}
 +
{{Example
 +
|Description=A snipped of code that makes a frame resizable and sets the minimum size to its current size.
 +
|Code=frame:SetSizable( true )
 +
frame:SetMinWidth( frame:GetWide() )
 +
frame:SetMinHeight( frame:GetTall() )
 
}}
 
}}

Revision as of 17:19, 7 January 2020

 DFrame:SetSizable( )

Contents

DescriptionPanelFunc

Sets whether or not the DFrame can be resized by the user.

This is achieved by clicking and dragging in the bottom right corner of the frame.

You can set the minimum size using DFrame:SetMinWidth and DFrame:SetMinHeight.

Arguments

boolean sizeable

Whether the frame should be resizeable or not.

Examples

Example

A snipped of code that makes a frame resizable and sets the minimum size to its current size.

frame:SetSizable( true )
frame:SetMinWidth( frame:GetWide() )
frame:SetMinHeight( frame:GetTall() )


Personal tools
Navigation