Tabs disable

Started by roccio, 09 March 2018, 10:07:13

roccio

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

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.

roccio


texus

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.
Code (cpp) Select
tabs->setTabEnabled(2, false);

roccio

This is a very usefull function, thank you very much!