Version 3.3.1.2

Odin has a dedicated attribute overview with examples

TableColumnWidthAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | AttributeTargets.All, AllowMultiple = false)]
[Conditional("UNITY_EDITOR")]
public class TableColumnWidthAttribute : Attribute, _Attribute
The TableColumnWidth attribute is used to further customize the width of a column in tables drawn using the TableListAttribute.
Inheritance
  • System.Object
  • System.Attribute
  • TableColumnWidthAttribute
Example
[TableList]
public List<SomeType> TableList = new List<SomeType>();

[Serializable]
public class SomeType
{
    [LabelWidth(30)]
    [TableColumnWidth(130, false)]
    [VerticalGroup("Combined")]
    public string A;

    [LabelWidth(30)]
    [VerticalGroup("Combined")]
    public string B;

    [Multiline(2), Space(3)]
    public string fields;
}

Constructors

TableColumnWidthAttribute(Int32, Boolean)
Initializes a new instance of the TableColumnWidthAttribute class.
public TableColumnWidthAttribute(int width, bool resizable = true)
Parameters
System.Int32 width

The width of the column in pixels.

System.Boolean resizable

If true then the column can be resized in the inspector.

Fields

Resizable
Whether the column should be resizable. True by default.
public bool Resizable
Width
The width of the column.
public int Width