Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ydn-javascript] context menu positioning

Expand Messages
  • Todd Kloots
    If you want more control, add a beforeShow event listener to the ContextMenu instance and use that to the the xy configuration property to whatever you need.
    Message 1 of 3 , Nov 29, 2007
      If you want more control, add a "beforeShow" event listener to the
      ContextMenu instance and use that to the the xy configuration property
      to whatever you need. For example:

      oContextMenu.subscribe("beforeShow", function () {

      var aCurrentXY = this.cfg.getProperty("xy");

      this.cfg.setProperty("xy", [(aCurrentXY[0] + 10), (aCurrentXY[1] +
      10)]);

      });

      - Todd

      mmhougland wrote:
      >
      > I've seen this question asked, but I can't find an answer. I have a
      > context menu and need more control over positioning. How do I position
      > the menu so that it is not relative to the cursor position?
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.