Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
Setting up IGMenuItem 'Index
posted

Hi

I've to add some additonal items in MdiTab contextMenu , so i overide the OnInitializeContextMenu to do this.

but the items i've added appears in the end of the list , even if i set up their Index property , it seems that it does not work at all.

Is there any other property that i have to set up to get my IGMenuItem in the right Index.

Thanks

 

Parents
  • 6158
    Suggested Answer
    Offline posted

    Hello. 

    Based on the behavior you are describing, it sounds as if you are setting the Index property prior to adding it to the MenuItems collection. The IGMenuItem class is derived from the .NET MenuItem class, and must be associated with a menu for the Index setter to perform any functionality.

    The simple solution is to either set the Index after you've added it to the collection, or use the Add() overload on the MenuItems collection that accepts the index.

    If you require further assistance, feel free to ask.

    Chris

Reply Children
No Data