I have added a custom context menu to the main window by doing the following
in window.applicaiton.main :

    mainWin = window.application.getClientDocument();
    ...
    this.mainWin.add( createContextMenu( ) );

    this.mainWin.addEventListener("contextmenu", function(e) {
                                 var button = e.getButton( );
                                 var x = e.getPageX( );
                                 var y = e.getPageY( );
                                 var contextMenu = 
window.application.contextMenu;
                                 
                                 if( button == "right" )
                                   {
                                     contextMenu.setLocation(x,y);
                                     if( !contextMenu.isSeeable() )
                                       {
                                         contextMenu.show( );
                                       }
                                   }
                                 else
                                   {
                                   contextMenu.hide( );
                                 }
                               });


function createContextMenu( )
{
  window.application.contextMenu = new QxMenu();
  
  var rightMenu = window.application.contextMenu;

  // Navigation Menus
  var backBtn   = new QxMenuButton("Back");
  var fwdBtn    = new QxMenuButton("Forward");
  var reloadBtn = new QxMenuButton("Reload Map");
  var stopBtn   = new QxMenuButton("Stop");
  var homeBtn   = new QxMenuButton("Home");

  backBtn.addEventListener( "execute", backTool );              // 0
  fwdBtn.addEventListener( "execute", forwardTool );            // 1
  reloadBtn.addEventListener( "execute", reloadTool );          // 2
  stopBtn.addEventListener( "execute", stopTool );              // 3
  homeBtn.addEventListener( "execute", homeTool );              // 4

  backBtn.setEnabled( false );
  fwdBtn.setEnabled( false );
  stopBtn.setEnabled( false );

  rightMenu.add( backBtn, fwdBtn, reloadBtn, stopBtn, 
                 homeBtn );

}

This only seems to work in Firefox.  I have tested it in Netscape 7.2 & 8,
Mozilla, and IE with no luck.  What did I do wrong?

TIA,
Tim
-- 
View this message in context: 
http://www.nabble.com/Custom-Context-Menu-Not-Working-tf1867592.html#a5103048
Sent from the qooxdoo-devel forum at Nabble.com.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to