Hi,
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 Shift
key. It just goes to the next tab.
You can see the illustration of the problem here:
https://www.dropbox.com/s/fx185im9r5i4b6g/c4d199_stacking_tabs_gui.mp4?dl=0
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?