0 votes

I want to make a feature where if you click a tab, you can focus it and modify its title to your will. Is there any way I can make a changeable text??

Godot version 3.2.3
in Engine by (380 points)

1 Answer

0 votes

You can use tab_selected(int tab) signal from each tab and trigger a one shot timer whenever a click event is received. If a click occurred while the timer is active (double click), make a pop-up that contains a LineEdit, confirmation button and a cancel button. when the user confirms, use set_tab_title() to edit the title.

Make sure you pass up the tab number from tab_selected(int tab) so that you know which tab to change its title.

This approach looks a bit different (and kind of old-school), but it's simpler to code.

by (288 points)
edited by
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.