Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

TreeItem

Inherits: Object

An internal control for a single item inside Tree.

Description

A single item of a Tree control. It can contain other TreeItems as children, which allows it to create a hierarchy. It can also contain text and buttons. TreeItem is not a Node, it is internal to the Tree.

To create a TreeItem, use Tree.create_item or create_child. To remove a TreeItem, use Object.free.

Note: The ID values used for buttons are 32-bit, unlike int which is always 64-bit. They go from -2147483648 to 2147483647.

Properties

bool

collapsed

int

custom_minimum_height

bool

disable_folding

bool

visible

Methods

void

add_button ( int column, Texture2D button, int id=-1, bool disabled=false, String tooltip_text="" )

void

add_child ( TreeItem child )

void

call_recursive ( StringName method, ... ) vararg

void

clear_custom_bg_color ( int column )

void

clear_custom_color ( int column )

TreeItem

create_child ( int index=-1 )

void

deselect ( int column )

void

erase_button ( int column, int button_index )

AutowrapMode

get_autowrap_mode ( int column ) const

Texture2D

get_button ( int column, int button_index ) const

int

get_button_by_id ( int column, int id ) const

int

get_button_count ( int column ) const

int

get_button_id ( int column, int button_index ) const

String

get_button_tooltip_text ( int column, int button_index ) const

TreeCellMode

get_cell_mode ( int column ) const

TreeItem

get_child ( int index )

int

get_child_count ( )

TreeItem[]

get_children ( )

Color

get_custom_bg_color ( int column ) const

Color

get_custom_color ( int column ) const

Font

get_custom_font ( int column ) const

int

get_custom_font_size ( int column ) const

bool

get_expand_right ( int column ) const

TreeItem

get_first_child ( ) const

Texture2D

get_icon ( int column ) const

int

get_icon_max_width ( int column ) const

Color

get_icon_modulate ( int column ) const

Rect2

get_icon_region ( int column ) const

int

get_index ( )

String

get_language ( int column ) const

Variant

get_metadata ( int column ) const

TreeItem

get_next ( ) const

TreeItem

get_next_in_tree ( bool wrap=false )

TreeItem

get_next_visible ( bool wrap=false )

TreeItem

get_parent ( ) const

TreeItem

get_prev ( )

TreeItem

get_prev_in_tree ( bool wrap=false )

TreeItem

get_prev_visible ( bool wrap=false )

float

get_range ( int column ) const

Dictionary

get_range_config ( int column )

StructuredTextParser

get_structured_text_bidi_override ( int column ) const

Array

get_structured_text_bidi_override_options ( int column ) const

String

get_suffix ( int column ) const

String

get_text ( int column ) const

HorizontalAlignment

get_text_alignment ( int column ) const

TextDirection

get_text_direction ( int column ) const

OverrunBehavior

get_text_overrun_behavior ( int column ) const

String

get_tooltip_text ( int column ) const

Tree

get_tree ( ) const

bool

is_any_collapsed ( bool only_visible=false )

bool

is_button_disabled ( int column, int button_index ) const

bool

is_checked ( int column ) const

bool

is_custom_set_as_button ( int column ) const

bool

is_edit_multiline ( int column ) const

bool

is_editable ( int column )

bool

is_indeterminate ( int column ) const

bool

is_selectable ( int column ) const

bool

is_selected ( int column )

void

move_after ( TreeItem item )

void

move_before ( TreeItem item )

void

propagate_check ( int column, bool emit_signal=true )

void

remove_child ( TreeItem child )

void

select ( int column )

void

set_autowrap_mode ( int column, AutowrapMode autowrap_mode )<