flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Flex - Disable an item with checkbox in List
Date Fri, 17 Jun 2016 17:46:42 GMT
Maybe this? 
http://blogs.adobe.com/aharui/2007/06/disabling_list_selection.html

On 6/17/16, 9:11 AM, "mark goldin" <markzolotoy@gmail.com> wrote:

>I have a List with checkboxes. I wan to disable some items based on List's
>data.
>
>Here is my List:
>
><mx:List id="templateList" width="100%" alternatingItemColors="[#EEEEEE,
>white]"
>labelField="Name" selectedIndex="0">
><mx:itemRenderer>
><mx:Component>
><templateFilterCheckBox/>
></mx:Component>
></mx:itemRenderer>
></mx:List>
>
><?xml version="1.0" encoding="utf-8"?>
><mx:CheckBox selectedField="isSelected" change="onChange(event)"
>enabled="{data.enabled}"
>xmlns:mx="http://www.adobe.com/2006/mxml">
><mx:Script>
><![CDATA[
>private function onChange(event:Event):void
>{
>data.isSelected = !data.isSelected;
>var _changeComplete:Event = new Event("filterChangeComplete", true);
>dispatchEvent(_changeComplete);
>}
>]]>
></mx:Script>
></mx:CheckBox>
>
>I have set data.enabled to false for all items just for testing. None of
>checkboxes come out disabled. The data provider is an AraayCollection and
>bindable.
>Any idea what is missed?
>
>Thanks

Mime
View raw message