How to draw Alternative Row Background in TileList

How to draw Alternative Row Background in TileList?
TileList inherits from TileBase. TileBase has a function called "drawTileBackground".

How do we select the color for the background color of the tile? We can create a class that extends TileList and override this function in order to change this color.

I tried this but my overriding function was never called!, After looking in the code in TileBase i realized that "drawTileBackground" is called from the function "drawTileBackgrounds" (with S at the end) but in this function i never reached the line where "drawTileBackground" is used. This is due to the fact that the style "alternatingItemColors" was null. By changing this style to anything else other then NULL i got the expected behavior.

See the code for the class below


<?xml version="1.0" encoding="utf-8"?>

Notice that i defined a public member called "colorFunction" of type function, in order to get a different color for a tile , a function pointer must be assigned to this member. See Below


<?xml version="1.0" encoding="utf-8"?>

See the example in action here:
http://www.softologia.com/sites/default/files/TileListTest.swf