On 21/10/2014 at 09:47, xxxxxxxx wrote:
Hello,
simply add a member variable to the first dialog. This way the second dialog is owned and managed by the first GeDialog:
**class DialogB(c4d.gui.GeDialog) :**
def CreateLayout(self) :
self.SetTitle("Dialog B")
self.AddCustomGui(id=1001, pluginid=c4d.CUSTOMGUI_LINKBOX, name="Link", flags=c4d.BFH_LEFT, minw=200, minh=100)
self.AddButton(id=1000,flags=c4d.BFH_LEFT,initw=100,inith=100,name="Close")
return True
def Command(self, id, msg) :
if id == 1000:
self.Close()
return True
**class DialogA(c4d.gui.GeDialog) :**
dialog = None
def CreateLayout(self) :
self.SetTitle("Dialog A")
self.AddButton(1000,c4d.BFH_LEFT,200,100,"Open Dialog")
return True
def Command(self, id, msg) :
if id == 1000:
if self.dialog == None:
self.dialog = DialogB()
self.dialog.Open(dlgtype=c4d.DLG_TYPE_ASYNC, pluginid=1000051, defaultw=400, defaulth=400)
return True
To use a link in a dialog you have to create a custom GUI element of the type CUSTOMGUI_LINKBOX. But you have to use a async dialog when you want to drag something into this link.
best wishes,
Sebastian