TabContainer - Close by Mouseclick

kryzmakkryzmak Posts: 42Member

Hi there,

Is there any possibility to add an "x" to tabs of TabContainer and make them closing via mouseclick just like with every modern browser ui?
I am programming a game terminal/console with multitab ability and make them open by player via a special keystroke and player can close the active tab via typing command "exit" (child of tabcontainer is RichTextLabel). Additionally I want the player to close tabs via that mouseclick.

Answers

  • SchusterSchuster Posts: 269Member

    Hi,you can use TextureButton and connect signal pressed() to close tabs

  • kryzmakkryzmak Posts: 42Member
    edited January 8

    Thanks for the reply, but isn't there any "build-in" possibility or what do these options mean?

  • SchusterSchuster Posts: 269Member
    edited January 8

    Hi,
    I don't work with Tabs much, yet....maybe once :) .....so better look at some tutors :
    youtube.com/watch?v=00569Osm-OM
    and there
    youtube.com/watch?v=6G3NP5O9VsQ
    .....hope this helps.

  • kryzmakkryzmak Posts: 42Member

    Hi,

    I watched them, but unfortunately my question is not answered yet. But thanks for your time.

  • kryzmakkryzmak Posts: 42Member

    Just to push that post once again. Still did not found any solution. :-(
    Set Custom theme of TabContainer to the theme like godot engine uses for it self. Also set_close_display_policy() to show allways (ENUM* 2). But as allways, no closing button in Tab title is shown:

Sign In or Register to comment.