The 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. [...]
376 readersThe following example shows how you can create a fancy Spark List control item renderer by setting the itemRenderer property. Full code after the jump. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/01/27/creating-a-fancy-spark-list-control-item-renderer-in-flex-4/ --> <s:Application name="Spark_List_itemRenderer_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" [...]
167 readersThe following example shows how you can set the text indent on a Spark List control in Flex 4 by creating a custom item renderer using the RichText control and setting the textIndent style. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/02/19/setting-a-text-indent-on-the-spark-list-control-in-flex-4/ --> <s:Application name="Spark_List_itemRenderer_textIndent_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" [...]
391 readersI'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:
173 readersThe following example shows how you can prevent item selection in the Spark List control in Flex 4 by listening for the changing event and calling the preventDefault() method on the IndexChangeEvent event object instance. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/02/25/preventing-item-selection-in-the-spark-list-control-in-flex-4/ --> <s:Application name="Spark_List_changing_test" xmlns:fx="http://ns.adobe.com/mxml/2009" [...]
207 readersThe following example shows how you can resize the Spark DropDownList control to match the currently selected list item in Flex 4 by setting the DropDownList control’s typicalItem property to the currently selected item. Full code after the jump. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/01/21/resizing-a-spark-dropdownlist-control-to-match-the-currently-selected-item-in-flex-4/ --> <s:Application name="Spark_DropDownList_typicalItem_test" xmlns:fx="http://ns.adobe.com/mxml/2009" [...]
243 readersIn a previous example, “Creating a variable row height item renderer on a ComboBox control in Flex”, we saw how you could create a variable row height item renderer on a Flex MX ComboBox control by setting the variableRowHeight property on the ComboBox control’s dropdown property. The following example shows how you can create a
192 readersIn a previous example, “Preventing item selection in the Spark List control in Flex 4″, we saw how you can prevent item selection in the Spark List control in Flex 4 by listening for the changing event and calling the preventDefault() method on the IndexChangeEvent event object instance. The following example shows how you can
364 readersThe following example shows how you can loop through items in a Spark List control in Flex 4 by setting the Boolean arrowKeysWrapFocus property. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/02/03/looping-through-items-in-a-spark-list-control-in-flex-4/ --> <s:Application name="Spark_List_arrowKeysWrapFocus_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <s:controlBarContent> [...]
263 readersI've been blogging about different styling issues within the Flex framework. I'd like to take a second to touch on a fairly common issue when trying to style item renderers. Item renderers are extremely helpful with memory management. As a user scrolls through a list the the flash player only has to instantiate a handful
304 readersThe following example shows how you can create a Spark TextArea control in Flex 4 which resizes vertically when lines are added or removed by setting the heightInLines property to NaN (Not a Number). Full code after the jump. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/01/18/creating-a-vertically-auto-resizing-spark-textarea-control-in-flex-4/ --> <s:Application name="Spark_TextArea_heightInLines_NaN_test" xmlns:fx="http://ns.adobe.com/mxml/2009" [...]
3,615
Subscribe to RSS headline updates from:
GurusUnleashed
Powered by FeedBurner
Curious what others are searching for? Below are the most popular search terms over the last 30 days.

