Friday, February 20, 2009

Custom item renderers for Lists, ComboBoxes, and DataGrids

If you haven't already read these articles on creating custom item renderers then do so now, they will save you a lot of time. I wish I had found them a few days ago!

  • http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html

  • http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende.html


  • Who thought that creating a CheckBox list would be so difficult? I've actually ended using a custom CheckBoxList class that just puts CheckBox components directly into a VBox instead of using a List with a CheckBox itemRenderer because I was having too many difficulties getting it to work.

    Most of my problems are cause by two things:
  • When filtering and scrolling the list I found that the checkboxes would lose their selected state. I know the renderers are recycled, but I still couldn't get it to work consistently.

  • I had difficulty changing the selected property of my data items through ActionScript code (e.g. select all, select none, etc). I couldn't get the renderers to update properly and have the right checked value.


  • Most likely it is just my lack of understanding...

    No comments: