Tabs disable
« on: 09 March 2018, 10:07:13 »
Hello,
I have some tabs in my application, but I would like to disable one (ore more) if something happens.
Is this possible?

Thanks

*

texus

  • *****
  • 1280
    • View Profile
    • Texus's Blog
Re: Tabs disable
« Reply #1 on: 09 March 2018, 18:41:33 »
No, this currently can't be done.
Widget don't really have a different look in the "disabled" state yet. This is on the todo list for 0.8-alpha, at least for the default white theme. By updating the theme I will have to test all widgets anyway, so I'll see if I can add such functionality. But this should not be expected soon, I still have to rework the focus state first and it isn't progressing very fast.

Re: Tabs disable
« Reply #2 on: 12 March 2018, 08:45:36 »
Thanks!

*

texus

  • *****
  • 1280
    • View Profile
    • Texus's Blog
Re: Tabs disable
« Reply #3 on: 07 April 2018, 11:12:50 »
A setTabEnabled function was added in 0.8-dev (can be downloaded from github).

The first parameter is the index of the tab, the second parameter is whether or not the tab should be enabled.
tabs->setTabEnabled(2, false);

Re: Tabs disable
« Reply #4 on: 09 April 2018, 09:11:47 »
This is a very usefull function, thank you very much!