Stacking Tabs Menu?
Is there a way to have stacking tabs the same way the attribute manager? (Not sure what's it really called)
Currently, with my code, it doesn't stack when I hold the
Shiftkey. It just goes to the next tab.
You can see the illustration of the problem here:
You can check the working code (in a .pyp file) here:
import c4d from c4d import gui, plugins, bitmaps, utils, documents PLUGIN_ID = 9201239 class TabDialog(gui.GeDialog): def CreateLayout(self): self.TabGroupBegin(id=5555, flags=c4d.BFH_LEFT, tabtype=c4d.TAB_TABS) self.GroupBegin(id=1031, flags=c4d.BFH_SCALEFIT, cols=1, rows=4, title="Tab1") self.AddStaticText(id=1041, flags=c4d.BFH_LEFT, initw=275, name="Stack Tab1", borderstyle=c4d.BORDER_NONE) self.GroupEnd() self.GroupBegin(id=1035, flags=c4d.BFH_SCALEFIT, cols=1, rows=4, title="Tab2") self.AddStaticText(id=1045, flags=c4d.BFH_LEFT, initw=275, name="Stack Tab2", borderstyle=c4d.BORDER_NONE) self.GroupEnd() return True def Command(self, id, msg): if id == 12345: pass return True class TabMenu(plugins.CommandData): dialog = None def Execute(self, doc): if self.dialog is None: self.dialog = TabDialog() return self.dialog.Open(dlgtype=c4d.DLG_TYPE_ASYNC, pluginid=PLUGIN_ID, defaultw=200, defaulth=150, xpos=-1, ypos=-1) def RestoreLayout(self, sec_ref): # manage the dialog if self.dialog is None: self.dialog = MyDialog() return self.dialog.Restore(pluginid=PLUGIN_ID, secret=sec_ref) if __name__ == "__main__": okyn = plugins.RegisterCommandPlugin(PLUGIN_ID, "Stack Tab Menu",0, None, "Stack Tab Menu", TabMenu()) if (okyn): print "Stack Tab Menu Test"
Is such a feature available for the GeDialog?
Hi bentraje, thanks for reaching out us.
With regard to your issue, I recommend to have a look at the QuicktabCustomGui which actually delivers the desired behavior.
You can also find on our GitHub repo the customgui_quicktab_r19.py example showing how to make good use of it.
Thanks for the response. I tried the sample script you referred but unfortunately it doesn not stack.
When hold shift, it just goes to another tab and so on.
Is there a way around this?
Hi bentraje, you have to set to
Falsethe value for the
QUICKTAB_NOMULTISELECTin the BaseContainer used to store the QuickTabGui parameters.
This will allow you to have multiple tabs being selectable and then display the corresponding groups based on the list of items being selected.
Thanks for the response. I changed it and it does select both tabs but it does not stack them. You can see an illustration here:
In addition, as in the code above, I'm using
TabGroupBeginto set tabs. Is it possible with stacking tabs? Or does it have to be
QuickTabCustomGuifor it to work?
QUICKTAB_NOMULTISELECTparameter for the
Hi bentraje, the logic of displaying the content of both should be adapted in the
DisplayCorrectGroupfunction which, standing on the current implementation on GitHub, only consider one Group. Extending to get it working for more than one should be trivial.
With regard to the "stacked" tabs functionality, as said above, you can get it working with QuickTabCustomGui in GeDialogs.
Thanks for the response.
RE: Extending to get it working for more than one should be trivial.
Unfortunately, the whole code is trivial to me being novice.
Anyhow, I guess I'll just learn on QuickTabCustomGui on a separate thread.
RE: With regard to the "stacked" tabs functionality, as said above
Yes, you did. I was wondering if there is an option for the
TabGroupBeginas that is somewhat straight forward to me rather than the
So I guess, this confirms that it is not possible for the
Again, no further action required. Will just open another thread for the