Skip to main content
Inspiring
March 7, 2012
Answered

Hide menu item

  • March 7, 2012
  • 2 replies
  • 24261 views

Hi,

I can disable an item from a menu item, but it is a way to hide completely the option from a menu?

It is any menu component up there with this functionality?

Thanks

    This topic has been closed for replies.
    Correct answer Carol_L__Frampton

    Or you can have one ArrayCollection which you manipulate using the methods in ArrayCollection (addItem, removeItem, etc) to have the correct items for the login type.  If your dataProvider is anything that implements ICollectionView, mx:Menu will listen for the collection change events (CollectionEvents) and update the menu accordingly.

    Alternatively you can change the dataProvider.

    2 replies

    Participating Frequently
    March 8, 2012

    Read the section called "About Menu Data Providers - Collections" in http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7b1e.html.

    jfb00Author
    Inspiring
    March 8, 2012

    Good Link,

    The solution is: if I have 4 types of logins them create 4 different arrayCollections of Data with menu items for each login type and make the selection at the time of loading the app.

    Am I correct?

    Thanks!

    Carol_L__FramptonCorrect answer
    Participating Frequently
    March 8, 2012

    Or you can have one ArrayCollection which you manipulate using the methods in ArrayCollection (addItem, removeItem, etc) to have the correct items for the login type.  If your dataProvider is anything that implements ICollectionView, mx:Menu will listen for the collection change events (CollectionEvents) and update the menu accordingly.

    Alternatively you can change the dataProvider.

    Participating Frequently
    March 8, 2012

    Which menu are you talking about?

    jfb00Author
    Inspiring
    March 8, 2012