I'm having troubles to understand the SetCommandDragId
function for c4d.gui.BitmapButtonCustomGui
.
I'm using the following function to add my BitmapButton to my Dialog:
def AddIconButton(self, buttonid, title, iconid, tooltip):
bc = c4d.BaseContainer()
bc.SetBool(c4d.BITMAPBUTTON_BUTTON, True)
bc.SetInt32(c4d.BITMAPBUTTON_ICONID1, iconid)
bc.SetString(c4d.BITMAPBUTTON_TOOLTIP, tooltip)
bc.SetInt32(c4d.BITMAPBUTTON_FORCE_SIZE, 32)
button = self.AddCustomGui(buttonid, c4d.CUSTOMGUI_BITMAPBUTTON, title, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, 40, 40, bc)
#set button.SetCommandDragId() here?!!!
return button
Even inside the CreateLayout I had no luck with FindCustomGUI()
...
What's the best way to approach this?
Thanks,
Lasse