A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.UI.ILayoutElement.html below:

Interface ILayoutElement

A component is treated as a layout element by the auto layout system if it implements ILayoutElement.

Namespace: UnityEngine.UI Assembly: UnityEngine.UI.dll Syntax
public interface ILayoutElement
Properties flexibleHeight

The extra relative height this layout element should be allocated if there is additional available space.

Declaration
float flexibleHeight { get; }
Property Value Examples
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when using UI elements.

public class ExampleClass : MonoBehaviour
{
    public Transform MyContentPanel;

    //Sets the flexible height on on all children in the content panel.
    public void Start()
    {
        //Assign all the children of the content panel to an array.
        LayoutElement[] myLayoutElements = MyContentPanel.GetComponentsInChildren<LayoutElement>();

        //For each child in the array change its LayoutElement's flexible height to 100.
        foreach (LayoutElement element in myLayoutElements)
        {
            element.flexibleHeight = 100f;
        }
    }
}
flexibleWidth

The extra relative width this layout element should be allocated if there is additional available space.

Declaration
float flexibleWidth { get; }
Property Value Examples
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when using UI elements.

public class ExampleClass : MonoBehaviour
{
    public Transform MyContentPanel;

    //Sets the flexible height on on all children in the content panel.
    public void Start()
    {
        //Assign all the children of the content panel to an array.
        LayoutElement[] myLayoutElements = MyContentPanel.GetComponentsInChildren<LayoutElement>();

        //For each child in the array change its LayoutElement's flexible width to 200.
        foreach (LayoutElement element in myLayoutElements)
        {
            element.flexibleWidth = 200f;
        }
    }
}
layoutPriority

The layout priority of this component.

Declaration
int layoutPriority { get; }
Property Value minHeight

The minimum height this layout element may be allocated.

Declaration Property Value minWidth

The minimum width this layout element may be allocated.

Declaration Property Value preferredHeight

The preferred height this layout element should be allocated if there is sufficient space.

Declaration
float preferredHeight { get; }
Property Value preferredWidth

The preferred width this layout element should be allocated if there is sufficient space.

Declaration
float preferredWidth { get; }
Property Value Methods CalculateLayoutInputHorizontal()

After this method is invoked, layout horizontal input properties should return up-to-date values. Children will already have up-to-date layout horizontal inputs when this methods is called.

Declaration
void CalculateLayoutInputHorizontal()
CalculateLayoutInputVertical()

After this method is invoked, layout vertical input properties should return up-to-date values. Children will already have up-to-date layout vertical inputs when this methods is called.

Declaration
void CalculateLayoutInputVertical()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4