Search - User list
Full Version: python set current tab
Root » Technical Discussion » python set current tab
ivan
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:

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
ivan
YES! thank you!
jim707jim707jim
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB