On 24/11/2016 at 07:55, xxxxxxxx wrote:
Hello fellow programmers,
I want to add a number of separators for a popup menu that I'm implementing in order to group the menu into different sections.
The first separator shows up fine, but the next one is omitted. Not sure if this is just a limit of the PopupDialog or if I'm doing something wrong.
Example code as follows:
import c4d
def main() :
bc = c4d.BaseContainer()
bc.SetString(c4d.FIRST_POPUP_ID+5, "Popup Menu 1...")
bc.SetString(c4d.FIRST_POPUP_ID+1, "Popup Menu 2...")
bc.SetString(c4d.FIRST_POPUP_ID+2, "Popup Menu 3...")
bc.SetString(0, "")
bc.SetString(c4d.FIRST_POPUP_ID+3, "Popup Menu 4...")
bc.SetString(0, "")
bc.SetString(c4d.FIRST_POPUP_ID+4, "Popup Menu 5...")
bc.SetString(c4d.FIRST_POPUP_ID, "Popup Menu 6...")
result = c4d.gui.ShowPopupDialog(cd=None, bc=bc, x = c4d.MOUSEPOS, y = c4d.MOUSEPOS, flags = c4d.POPUP_CENTERHORIZ) - c4d.FIRST_POPUP_ID
if __name__=='__main__':
main()
Like I said, the separator after "Popup Menu 3..." shows up but the next one doesn't.
Hopefully someone can clarify the situation.
Thanks
Jo