locked
Invisble all items when make invisible first item if dynamic list RRS feed

  • Question

  • hello.

    i'm writing an extension for visual studio. This extension has a dynamic mru list. my problem is when i make invisible the first item of the list, all items gone! But i want only the visibility of first item changed and another items remain visible.

    I'm using Visual Studio 2010

    thanks

    Tuesday, July 6, 2010 8:19 AM

Answers

  • I think people run into this quite a bit. Unfortunately, the code that enumerates dynamic items takes its cue from the result of QueryStatus on the 'seed' command. The thing is, dynamic menu items were designed orignally for "MRU" lists (such as the file or project sub-menus on the File menu or windows list on the Window menu) where there are no 'gaps' or invisible items and enumeration stops at the end of the list.

    Are you able to arrange it so that you can shuffle up all the other items into the gaps left by the invisible ones, thus creating a contiguous list? Essentially, you'd have to build a mapping from the actual items to their contiguous position in the list and maintain that mapping as the IDE enumerates through your list.


    Visual Studio Platform and Ecosystem
    • Marked as answer by Chao Kuo Tuesday, July 13, 2010 2:14 AM
    Sunday, July 11, 2010 12:36 AM

All replies

  • Hello, DevHandle

    Could you tell us how did you add the MRU list? In an add-in or in a VSpackage with VSCT?

    I hope you could provide me essential information.

    Thanks

    Chao

    Wednesday, July 7, 2010 12:58 PM
  • I think people run into this quite a bit. Unfortunately, the code that enumerates dynamic items takes its cue from the result of QueryStatus on the 'seed' command. The thing is, dynamic menu items were designed orignally for "MRU" lists (such as the file or project sub-menus on the File menu or windows list on the Window menu) where there are no 'gaps' or invisible items and enumeration stops at the end of the list.

    Are you able to arrange it so that you can shuffle up all the other items into the gaps left by the invisible ones, thus creating a contiguous list? Essentially, you'd have to build a mapping from the actual items to their contiguous position in the list and maintain that mapping as the IDE enumerates through your list.


    Visual Studio Platform and Ecosystem
    • Marked as answer by Chao Kuo Tuesday, July 13, 2010 2:14 AM
    Sunday, July 11, 2010 12:36 AM