SetDimensionConstraints

From ESOUI Wiki

(Difference between revisions)
Jump to: navigation, search
(Created page)
m (Fixed Typo)
 
Line 21: Line 21:
<source lang="lua">
<source lang="lua">
local AUTO_SIZE = 0
local AUTO_SIZE = 0
-
controlName:SetDimensionConstraints(100, 100, 400, AUTO_SIZE) -- Sets the minimum height to 0, but allows it to grow larger as needed (such as in a tooltip)
+
controlName:SetDimensionConstraints(100, 100, 400, AUTO_SIZE) -- Sets the minimum height to 100, but allows it to grow larger as needed (such as in a tooltip)
</source>
</source>
Page last edited during API 100034 "Flames of Ambition"
Page last edited during API 100034 "Flames of Ambition"

Latest revision as of 03:28, 5 May 2021

SetDimensionConstraints(number minWidth, number minHeight, number maxWidth, number maxHeight)
Returns: None

Contents

Overview

Set the dimensional limits of a control.

Arguments

(number) minWidth -Minimum width of the control
(number) minHeight - Minimum height of the control
(number) maxWidth - Maximum width of the control
(number) maxHeight - Maximum height of the control

Returns

None

Syntax

controlName:SetDimensionConstraints(100, 100, 500, 500)
Using a dimension size of 0 will allow the control to auto-size (Source: Use of AUTO_SIZE in this source file).

Example

local AUTO_SIZE = 0
controlName:SetDimensionConstraints(100, 100, 400, AUTO_SIZE) -- Sets the minimum height to 100, but allows it to grow larger as needed (such as in a tooltip)

Page last edited during API 100034 "Flames of Ambition"

External Links

Controls

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox