Control for a single item inside a [Tree].
Control for a single item inside a [Tree]. May have child [TreeItem]s and be styled as well as contain buttons.
You can remove a [TreeItem] by using [method Object.free].
Adds a button with [Texture] [code]button[/code] at column [code]column[/code]. The [code]id[/code] is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately before this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
Resets the background color for the given column to default.
Resets the color for the given column to default.
Deselects the given column.
Removes the button at index [code]button_idx[/code] in column [code]column[/code].
Returns the [Texture] of the button at index [code]button_idx[/code] in column [code]column[/code].
Returns the button index if there is a button with id [code]id[/code] in column [code]column[/code], otherwise returns -1.
Returns the number of buttons in column [code]column[/code].
Returns the id for the button at index [code]button_idx[/code] in column [code]column[/code].
Returns the tooltip string for the button at index [code]button_idx[/code] in column [code]column[/code].
Returns the column's cell mode.
Returns the TreeItem's first child item or a null object if there is none.
Returns the custom background color of column [code]column[/code].
Returns the custom color of column [code]column[/code].
Returns [code]true[/code] if [code]expand_right[/code] is set.
Returns the given column's icon [Texture]. Error if no icon is set.
Returns the column's icon's maximum width.
Returns the [Color] modulating the column's icon.
Returns the icon [Texture] region as [Rect2].
Returns the metadata value that was set for the given column using [method set_metadata].
Returns the next TreeItem in the tree or a null object if there is none.
Returns the next visible TreeItem in the tree or a null object if there is none.
If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code].
Returns the parent TreeItem or a null object if there is none.
Returns the previous TreeItem in the tree or a null object if there is none.
Returns the previous visible TreeItem in the tree or a null object if there is none.
If [code]wrap[/code] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns [code]null[/code].
Returns the value of a [constant CELL_MODE_RANGE] column.
Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".
Gets the suffix string shown after the column value.
Returns the given column's text.
Returns the given column's text alignment.
Returns the given column's tooltip.
Returns [code]true[/code] if the button at index [code]button_idx[/code] for the given column is disabled.
Returns [code]true[/code] if the given column is checked.
Returns [code]true[/code] if column [code]column[/code] is editable.
Returns [code]true[/code] if column [code]column[/code] is selectable.
Returns [code]true[/code] if column [code]column[/code] is selected.
Moves this TreeItem to the bottom in the [Tree] hierarchy.
Moves this TreeItem to the top in the [Tree] hierarchy.
Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free].
Selects the column [code]column[/code].
Sets the given column's button [Texture] at index [code]button_idx[/code] to [code]button[/code].
If [code]true[/code], disables the button at index [code]button_idx[/code] in column [code]column[/code].
Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants.
If [code]true[/code], the column [code]column[/code] is checked.
Sets the given column's custom background color and whether to just use it as an outline.
Sets the given column's custom color.
If [code]true[/code], column [code]column[/code] is editable.
If [code]true[/code], column [code]column[/code] is expanded to the right.
Sets the given column's icon [Texture].
Sets the given column's icon's maximum width.
Modulates the given column's icon with [code]modulate[/code].
Sets the given column's icon's texture region.
Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data.
Sets the value of a [constant CELL_MODE_RANGE] column.
Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode.
If [code]expr[/code] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit].
If [code]true[/code], the given column is selectable.
Sets a string to be shown after a column's value (for example, a unit abbreviation).
Sets the given column's text value.
Sets the given column's text alignment. See [enum TextAlign] for possible values.
Sets the given column's tooltip text.
If [code]true[/code], the TreeItem is collapsed.
The custom minimum height.
If [code]true[/code], folding is disabled for this TreeItem.
Cell contains a string.
Cell contains a checkbox.
Cell contains a range.
Cell contains an icon.
Align text to the left. See [code]set_text_align()[/code].
Center text. See [code]set_text_align()[/code].
Align text to the right. See [code]set_text_align()[/code].