Results 1 to 4 of 4

Thread: Context menu on nested tree component not showing at correct coordinates

  1. #1
    Sencha Premium Member
    Join Date
    Dec 2012
    Location
    Seattle, WA
    Posts
    423
    Answers
    34

    Default Context menu on nested tree component not showing at correct coordinates

    I have the following fiddle that has a nested tree component in a widow with border layout. When I add a menu using itemcontextmenu or containercontextmenu it is not shown at the correct XY coordinates.

    What am I doing wrong?

    https://fiddle.sencha.com/#view/editor&fiddle/2fmf

    Thanks

  2. #2
    Sencha User
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default


  3. #3
    Sencha Premium Member
    Join Date
    Dec 2012
    Location
    Seattle, WA
    Posts
    423
    Answers
    34

    Default

    Thanks for the feedback but I should have been more clear that the point was to add the menu to the tree view to use the window's view controller. In this way the menu is just created on the viewport.

  4. #4
    Sencha User
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    I am not sure if I have understood you correctly, but anyway check my fiddle again. I have created ViewController for your window with appropriate handler for menuItem click. It works.
    IHMO the menu must be described in separate class with it's own ViewController... the principle of low coupling... law of Demeter.

Similar Threads

  1. Context Menu attached to Tree component
    By Timetraveller in forum Q&A
    Replies: 5
    Last Post: 14 Sep 2017, 6:33 AM
  2. Replies: 3
    Last Post: 3 Jun 2016, 5:59 AM
  3. Replies: 10
    Last Post: 22 Apr 2013, 1:20 PM
  4. Replies: 4
    Last Post: 6 Apr 2010, 1:48 AM
  5. Replies: 5
    Last Post: 13 Jan 2009, 4:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •