ctor for DzMenu

peterpeter Posts: 53

Does anybody know, who to show a context-menu when right-clicking (i.e. a DzListViewItem).

Following code does not work:

var menu = new DzMenu();menu.addItem("Clear Poses");menu.addItem("Clear Shapes");menu.exec();

results in:

Script Error: Line 276

TypeError: no constructor for DzMenu

Stack Trace: ()@X:/.../Library/Properties/UI/CQuickFigureDialog.dsa:276

Is there a constructor for DzMenu?

Post edited by peter on

Comments

  • As far as I know this is not possible in scripting.

  • CGI3DMCGI3DM Posts: 276

    DzPopupMenu?

    Add parent, example, DzDialog,

    var wMenu = new DzPopupMenu( wDlg );

    wMenu.insertItem("Clear Poses",0,0)

     

    wMenu.exec () 

  • peterpeter Posts: 53

    Man!  I must be blind and had overlooked this topic in the object-index.

    Will try it in the evening (means: evening in my time-zone ;-)

    Thx a lot and greets from vienna

  • peterpeter Posts: 53

    It works !

    Thank you smiley

Sign In or Register to comment.