+1 vote

Hi guys, i want to use CELL_MODE_CUSTOM in TreeItem but i dont know how to start customing. This is the docs about TreeItem http://docs.godotengine.org/en/stable/classes/class_treeitem.html

I've figure out how to use


but for CELLMODECUSTOM i just dont know, i need this mode.

in Engine by (32 points)

1 Answer

+2 votes

You mainly use them to display popups like for example a drop down menu or a position entry popup. You connect the custom_popup_edited signal, then in the signal handling function you can use get_edited() to check which TreeItem was clicked and get_custom_popup_rect() to position the popup that you want to display.

by (1,546 points)

Note that the cell itself needs to be set as editable item.set_editable(0, true) before the tree could emit custom_popup_edited signal.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.