TabContainer keeps visible despite Visible = False

Post

Posted
Rating:
#1 (In Topic #2038)
Regular
sergioabreu is in the usergroup ‘Regular’

I have an app with multiple tabs. Hiding is failing

Hi everyone

One of my editors - I have one with TextEditor and a lite one that has tabs and textareas.
I am struggling with what I think is an intermitent bug because sometimes it hides, sometimes not when setting False to Visible.

The problem is that despite the property Visible of tabs[n] is False, the tabs[n] keeps showing and accepting interaction
Each Tab has a single child: a textarea.

Is this a failure in GTK ? Might be an outdated gambas problem?

Thanks
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by gbWilly)
#2
Regular
sergioabreu is in the usergroup ‘Regular’
I think I found a solution.

Instead of hiding, I kill it.
Remove the child textarea and remove the tabcontainer itself, setting tabs.count -= 1 was the way I got to solve it.

If someone is closing some tab, it means that they do not want it.

My previous idea was to keep in stand by to revive it in the next file text edition. But it seems better to remove and add at least in this project.
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
sergioabreu is in the usergroup ‘Regular’

sergioabreu said

I think I found a solution.

Instead of hiding, I kill it.

Remove the child textarea and remove the tabcontainer itself,  >>>> doing TABS[N].delete  <<<-

That's how tabs.count goes down and it was the way I got to solve it.

If someone is closing some tab, it means that they do not want it.

My previous idea was to keep in stand by to revive it in the next file text edition. But it seems better to remove and add at least in this project.

Online now: No Back to the top
1 guest and 0 members have just viewed this.