SizeConstraint (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mattchewy
No edit summary
>Legend26
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{|
<onlyinclude>{{Property
|<onlyinclude>{{Property|
|name       = SizeConstraint
name = SizeConstraint
|property   = [[SizeConstraint (Enum)|SizeConstraint]] ''SizeConstraint''
|property = [[Enum]] ''Direction of size constraint''
|description = Sets the direction that an object can be resized in.
|description = Sets the direction that an object can be resized in.
|objects = [[RBX.lua.Frame (Object)|Frame]], [[RBX.lua.ImageButton (Object)|ImageButton]], [[RBX.lua.TextBox (Object)|TextBox]], [[RBX.lua.TextButton (Object)|TextButton]], [[RBX.lua.TextLabel (Object)|TextLabel]]
|object      = GuiObject
|}}</onlyinclude>
}}</onlyinclude>
|}


{{clear floats}}


This changes the direction in which an object can be resized compared to the 3D view size
[[Category:Properties]]
{{LeftNoticeStart}}
Lets say you have a square on the screen, each side is 10 pixels wide. All of a sudden, you make the horizontal size of your 3D view twice as wide.
 
With the SizeConstraint set to RelativeXY, the box will resize itself to match this width. Therefore, it will now be 10 pixels high, but it will also be 20 pixels wide.
 
With the SizeConstraint set to RelativeXX, the box will resize itself to match only the change in width of the 3D view. Your box will stay a square, but it will change size.
 
With the SizeConstraint set to RelativeYY, the box will resize itself to match only the change in height of the 3D view. Your box will stay a square, but it will change size.
|}
 
The SizeConstraint Enum consists of 3 values:
 
0:RelativeXY
1:RelativeXX
2:RelativeYY

Latest revision as of 22:42, 23 December 2011

SizeConstraint
Property SizeConstraint SizeConstraint
Description Sets the direction that an object can be resized in.
Member of GuiObject