What is the Difference between a custom Component and an ItemRenderer?

I’ve been working with D for a few months as a personal mentoring client. We chat either via e-mail or Skype and I help him with his personal growth as a programmer. He asked me this question recently on itemRenderers and custom Flex components which made me think, so I’m turning it into a post: What is the difference between a custom component and an item renderer? Are they or can they be the same thing?? In general terms, an itemRenderer is a custom component. But, not all custom components can be used as itemRenderers. An itemRenderer component should implement

You Might Also Like...

  • Displaying the row number or index in a spark List

    498 readersThe ItemRenderer class in Flex 4 has an itemIndex property that was added after beta2. You can use this property within your item renderer to display the row number or index of an item in a spark List. The following example demonstrates a List with a custom item renderer that uses this itemIndex property. [...]

  • Creating an alternating item renderer in a Spark List control in Flex 4

    600 readersThe following example shows how you can create a custom item renderer in Flex 4 which repositions elements based on the current item renderer’s index in the data provider using the itemIndex property. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/04/08/creating-an-alternating-item-renderer-in-a-spark-list-control-in-flex-4/ --> <s:Application name="Spark_List_itemRenderer_itemIndex_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" [...]

  • Creating a semi-transparent item renderer on a Spark List control in Flex 4

    529 readersThe following example shows how you can create a semi-transparent item renderer on a Spark List control in Flex 4 by creating a custom Spark List skin and a custom item renderer which sets the alpha property on the selected/hovered states. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/04/06/creating-a-semi-transparent-item-renderer-on-a-spark-list-control-in-flex-4/ --> <s:Application name="Spark_List_itemRenderer_alpha_test" xmlns:fx="http://ns.adobe.com/mxml/2009" [...]

  • Setting a custom context menu on a Spark List control item renderer in Flex 4

    970 readersThe following example shows how you can set a custom context menu on a Spark List control item renderer in Flex 4 by setting the contextMenu property in the item renderer’s dataChange event. <?xml version="1.0"?> <!-- http://blog.flexexamples.com/2010/05/06/setting-a-custom-context-menu-on-a-spark-list-control-item-renderer-in-flex-4/ --> <s:Application name="Spark_List_itemRenderer_contextMenu_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" [...]

  • Adding a delete button in the hovered state of a Spark List control item renderer in Flex 4

    521 readersThe following example shows how you can add a delete button to the hovered state of a Spark List control item renderer in Flex 4 by creating a custom item renderer and listening for the mouseDown event. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/04/09/adding-a-delete-button-in-the-hovered-state-of-a-spark-list-control-item-renderer-in-flex-4/ --> <s:Application name="Spark_List_itemRenderer_hovered_test" xmlns:fx="http://ns.adobe.com/mxml/2009" [...]

  • Editable ItemRenderer for Flex 4 Spark List

    501 readersOne of the nice features of the Flex mx:List component is that you can set the renderers to be editable without having to create a new itemrenderer. With the Spark List (s:List) that option is no longer available. Fortunately it is quite easy to create a custom editable itemrenderer for the List.  swfobject.embedSWF("http://www.dgrigg.com/samples/editable-list-itemrenderer/EditableList.swf", "flashContent", "500",

  • Creating an alternating item renderer in a Spark List control in Flex 4 (redux)

    511 readersIn an earlier example, “Creating an alternating item renderer in a Spark List control in Flex 4″, we saw how you could create a custom item renderer in Flex 4 which repositions elements based on the current item renderer’s index in the data provider using the itemIndex property. The following example shows how you can

  • Creating an item renderer with a corner radius on a Spark List control in Flex 4

    519 readersThe following example shows how you can create a custom item renderer with a corner radius on a Spark List control in Flex 4 by setting the cornerRadius property and creating a custom item renderer which sets its autoDrawBackground property to false and draws its own rounded background fill using the radiusX property in the

  • Removing the rollover and selection highlight on a Spark List control in Flex 4

    769 readersThe following example shows how you can remove the item highlight background on a Spark List control in Flex 4 by setting the itemRenderer property to a custom item renderer with the Boolean autoDrawBackground property set to false. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/04/22/removing-the-rollover-and-selection-highlight-on-a-spark-list-control-in-flex-4/ --> <s:Application name="Spark_List_itemRenderer_autoDrawBackground_test" xmlns:fx="http://ns.adobe.com/mxml/2009" [...]

  • Creating a radio button item renderer on a Spark List control in Flex 4

    699 readersThe following example shows how you can use a Spark RadioButton control as an item renderer for a Spark List control in Flex 4 by setting the itemRenderer property. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/05/20/creating-a-radio-button-item-renderer-on-a-spark-list-control-in-flex-4/ --> <s:Application name="Spark_List_itemRenderer_RadioButton_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" [...]

'>How to create a top quality logo for your company
  • Remove a Section of Your Photo
  • Subscribe to RSS headline updates from: GurusUnleashed
    Powered by FeedBurner

  • Design & Career Resources

    Open design job and RFQ/RFP listings for Thursday, 29 July Courtesy of Design Jobs Live!
    The latest resources and free stuff (like textures, fonts, Photoshop brushes, scripts, plug-ins, and much more!) from workflowFreelance.com. Read more!
    The latest headlines from workflowFreelance.com. Read more!
  • Popular Search Terms

    Curious what others are searching for? Below are the most popular search terms over the last 30 days.