Hi Madhavi, You might be assigning the customItemrenderer directly to menu1.itemRenderer. assign an object of classfactory to itemRenderer:
menu1.itemRenderer = new ClassFactory(CustomMenuItemRenderer); hope the solution would work for you :) Thanks & Regards, Shalu On May 19, 9:21 am, ●๋•کŕíńíváکツ <[email protected]> wrote: > Can u show that Menu file.. i mean MENU DATA whre u writtn > =================== > > On Wed, May 18, 2011 at 3:41 PM, madhavi chinni <[email protected] > > > > > > > wrote: > > Hi, > > > I have created a Menu in actionscript.I am giving an array of strings > > as dataprovider to it. > > I want to change the styles of the labels in Menu.I tried creating > > customComponent which has HBox and Label and assigning it to the > > itemRenderer of Menu. I am getting an exception saying 'implicit > > coercion of a Class object to an IFactory. > > Can anyone please help me on this. > > Below is the code which I have used to create a Menu in actionscript > > protected function showMenu():void > > > { > > > menu1 = Menu.createMenu(null, filterTypes, > > false); > > > menu1.labelField="@label"; > > menu1.name=menu1.labelField.valueOf(); > > //menu1.iconField="@icon"; > > //menu1.setStyle("fontFamily","Arial"); > > > menu1.show(0, 35); > > > menu1.addEventListener(MenuEvent.ITEM_CLICK,menuItemClicked); > > > } > > > Thanks, > > Madhavi > > > -- > > You received this message because you are subscribed to the Google Groups > > "Flex India Community" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/flex_india?hl=en. > > -- > with regards.. > ●๋•کŕíńíváکツ- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.

