Select your preferred scripting language. All code snippets will be displayed in this language.
class in UnityEditor.IMGUI.Controls
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.Close
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.Close
The MultiColumnHeader is a general purpose class that e.g can be used with the TreeView to create multi-column tree views and list views.
It supports resizing of columns widths by dragging and provides useful callbacks for reacting to user input.
Note that columns can be hidden by the user using the context menu of the MultiColumnHeader.
Terminology used in the API: The parameter name
columnIndex is used for indices into the columns array in the MultiColumnHeaderState object. While the parameter name
visibleColumnIndex refers to the currently visible column index shown in the MultiColumnHeader.
|Use this property to control whether sorting is enabled for all the columns.
|Customizable height of the multi column header.
|The index of the column that is set to be the primary sorting column. This is the column that shows the sorting arrow above the header text.
|This is the state of the MultiColumnHeader.
|Calculates a cell rect for a column and row using the visibleColumnIndex and rowRect parameters.
|Returns the column data for a given column index.
|Returns the header column Rect for a given visible column index.
|Convert from column index to visible column index.
|Check if a column is currently visible in the MultiColumnHeader.
|Check the sorting order state for a column.
|Render and handle input for the MultiColumnHeader at the given rect.
|Requests the window which contains the MultiColumnHeader to repaint.
|Resizes the column widths of the columns that have auto-resize enabled to make all the columns fit to the width of the MultiColumnHeader render rect.
|Change sort direction for a given column.
|Sets the primary sorting column and its sorting order.
|Sets multiple sorting columns and the associated sorting orders.
|Override this method to extend the default context menu items shown when context clicking the header area.
|Override to customize the behavior when clicking a column header.
|Override to customize the GUI of a single column header.
|Called when sorting changes and dispatches the sortingChanged event.
|Called when the number of visible column changes and dispatches the visibleColumnsChanged event.
|Provides the button logic for a column header and the rendering of the sorting arrow (if visible).
|Method for toggling the visibility of a column.
|Subscribe to this event to get notified when sorting has changed.
|Subscribe to this event to get notified when the number of visible columns has changed.
|Delegate used for events from the MultiColumnHeader.