python set current tab

   2439   3   1
User Avatar
Member
84 posts
Joined: July 2005
Online
If I make an HDA with a row of tab folders, is there a way in python to set which tab is currently selected for editing?

so, for instance, every time my toggle widget is clicked, the B Folder becomes the selected one:

Attachments:
UIsample.jpg (8.9 KB)

User Avatar
Member
146 posts
Joined: June 2019
Offline
This one is interesting

So, your first tab is also an implicit parameter, but accessible only by parmTuple. If you set this parameter you can control focus.

Basically, let's say the name of your "A folder" is "tabs" (and you can only change parameter name on the first tab).
Then to control focus you should do something like this:

node.parmTuple("tabs").set((2,)) # exactly like this to pass tuple with one element
User Avatar
Member
84 posts
Joined: July 2005
Online
YES! thank you!
User Avatar
Member
3 posts
Joined: May 2018
Offline
elovikov
This one is interesting

So, your first tab is also an implicit parameter, but accessible only by parmTuple. If you set this parameter you can control focus.

Basically, let's say the name of your "A folder" is "tabs" (and you can only change parameter name on the first tab).
Then to control focus you should do something like this:

node.parmTuple("tabs").set((2,)) # exactly like this to pass tuple with one element



thank you very much
u saved me after two days searching python classes and methods! bless u
  • Quick Links