Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
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¶
Methods¶
void |
add_button ( int column, Texture2D button, int id=-1, bool disabled=false, String tooltip_text="" ) |
void |
|
void |
call_recursive ( StringName method, ... ) vararg |
void |
clear_custom_bg_color ( int column ) |
void |
clear_custom_color ( int column ) |
create_child ( int index=-1 ) |
|
void |
|
void |
erase_button ( int column, int button_index ) |
get_autowrap_mode ( int column ) const |
|
get_button ( int column, int button_index ) const |
|
get_button_by_id ( int column, int id ) const |
|
get_button_count ( int column ) const |
|
get_button_id ( int column, int button_index ) const |
|
get_button_tooltip_text ( int column, int button_index ) const |
|
get_cell_mode ( int column ) const |
|
get_child_count ( ) |
|
get_children ( ) |
|
get_custom_bg_color ( int column ) const |
|
get_custom_color ( int column ) const |
|
get_custom_font ( int column ) const |
|
get_custom_font_size ( int column ) const |
|
get_expand_right ( int column ) const |
|
get_first_child ( ) const |
|
get_icon_max_width ( int column ) const |
|
get_icon_modulate ( int column ) const |
|
get_icon_region ( int column ) const |
|
get_index ( ) |
|
get_language ( int column ) const |
|
get_metadata ( int column ) const |
|
get_next ( ) const |
|
get_next_in_tree ( bool wrap=false ) |
|
get_next_visible ( bool wrap=false ) |
|
get_parent ( ) const |
|
get_prev ( ) |
|
get_prev_in_tree ( bool wrap=false ) |
|
get_prev_visible ( bool wrap=false ) |
|
get_range_config ( int column ) |
|
get_structured_text_bidi_override ( int column ) const |
|
get_structured_text_bidi_override_options ( int column ) const |
|
get_suffix ( int column ) const |
|
get_text_alignment ( int column ) const |
|
get_text_direction ( int column ) const |
|
get_text_overrun_behavior ( int column ) const |
|
get_tooltip_text ( int column ) const |
|
get_tree ( ) const |
|
is_any_collapsed ( bool only_visible=false ) |
|
is_button_disabled ( int column, int button_index ) const |
|
is_checked ( int column ) const |
|