Hi,

Looks a bit confusing. May be it's easier for us to help you with a playground 
example. 

Regards Mustafa Sak

Von meinem iPhone gesendet

Am 03.03.2011 um 17:55 schrieb lgxco <[email protected]>:

> Hi,
> I am trying to add a context menu to a button inside a menu but contextMenu
> menu is never shown.
> On right click I get mouseUp and mouseDown events but I do not see any
> context event.
> 
> Doing the same operation (but with a different context menu) on parent
> menuButton works.
> 
> Strange enough if I use the same menu as contextMenu for both menuButton and
> and the button, and do the following :
> 
> -right click on 'menuButton' ( both contextMenu and menu of  'menuButton'
> appear )
> -while both menu are still shown right click on 'button',
> 
> Then contextMenu  of  'button' appear.
> 
> What am I doing wrong ?
> 
> example code:
> var toolbar = new qx.ui.toolbar.ToolBar(); 
> this.getRoot().add( toolbar );
> 
> var buttons = new qx.ui.toolbar.Part();
> toolbar.add( buttons );
> 
> var menuButton = new qx.ui.toolbar.MenuButton( "menuButton" );
> buttons.add( menuButton );
> 
> var contexMenu = new qx.ui.menu.Menu() ;
> var contextBt = new qx.ui.menu.Button( "contextBt" );
> menuButton .setContextMenu(contexMenu);
> contexMenu.add(contextBt);
> contextBt.addListener( "execute" , function(){ this.debug( "contextBt" ); }
> , contextBt );
> 
> var menu = new qx.ui.menu.Menu() ;
> menuButton .setMenu( menu );
> 
> var button = new qx.ui.menu.Button( "button" );
> menu.add( button );
> 
> button.setContextMenu(contexMenu); 
> /* //this never works
> var contexMenu2 = new qx.ui.menu.Menu() ;
> var contextBt2 = new qx.ui.menu.Button( "contextBt2" );
> button.setContextMenu(contexMenu2);
> contexMenu2.add(contextBt2);
> contextBt2.addListener( "execute" , function(){ this.debug( "contextBt2" );
> } , contextBt2 );
> */
> 
> button.addListener( "beforeContextmenuOpen" , function(){
> this.debug("beforeContextmenuOpen" ); } , button);
> button.addListener( "contextmenu" , function(){ this.debug( "contextmenu" );
> } , button );
> button.addListener( "mousedown" , function(){ this.debug(  "mousedown" ); }
> , button );
> button.addListener( "mouseup" , function(){ this.debug(  "mouseup" ); } ,
> button );
> this.debug( button.getContextMenu() );
> 
> 
> 
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/context-menu-on-menu-buttons-tp6085523p6085523.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in 
> Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
> generated by your applications, servers and devices whether physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain new business 
> insights. http://p.sf.net/sfu/splunk-dev2dev 
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to