Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting transparency of itemrenderers in spark list

I have a list that has alternating item colors.

<s:List id="myList" change="selectionChanged(event)" alternatingItemColors="[0x000000, 0xFFFFFF]" dataProvider="{alResults}" itemRenderer="itemRenders.Results" width="100%"></s:List>

I just simply want the item backgrounds to be transparent.

In the opening tag of the ItemRenderer, I tried this, but didn't work.

<s:ItemRenderer name="Results"
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    autoDrawBackground="true"
    contentBackgroundAlpha="0.2">

I tried setStyle in the data override method as well, and didn't work either. Thanks.

like image 934
David Avatar asked Jan 24 '26 06:01

David


1 Answers

ItemRenderer: autoDrawBackground="false" will disable its background.
List: you can use contentBackgroundColor to change background color or contentBackgroundAlpha="0" to make it transparent.

like image 121
vk23 Avatar answered Jan 25 '26 19:01

vk23



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!