I am using the Flex PopUpButton & data binding a Menu object to the popup. I successfully added an icon
to a menu item; however, it does not look like Menu supports the disabledIcon
property common in many other elements for use when enabled: false
for that menu item.
Is it possible to extend the Flex Menu class to use disabledIcon
? Should I use a different type of data binding class?
// create the array collection of menu items
var menuItems:ArrayCollection = new ArrayCollection();
var addWidget:Object = new Object();
addWidget = ({label: "Add",
id: ADD_WIDGET_ID,
icon: addIcon,
disabledIcon: addDisabledIcon,
enabled: false});
menuItems.addItem(addWidget);
var myMenu:Menu = new Menu();
myMenu.dataProvider = menuItems;
productActionsButton.popUp = myMenu;
The above code will produce a disabled Add
menu item where the menu item icon is addIcon
instead of the desired addDisabledIcon
because Mx:Menu does not currently support disabledIcon
.