The renderer's visible is always set to true when refreshed.  There is
no allowance for invisible renderers.  The mouse logic will detect hits
in the area of the renderer in case the renderer doesn't fully cover its
area in the dropdown.  There is a disabled list selection example on my
blog, and plenty of others have solutions.  Search the archives.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Sunday, April 27, 2008 4:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Label As Combobox Itemrenderer not working
properly

 

Hello Friends can any tell me what is wrong with this code. I am trying
to disable the labels but they are not disabled even visible = false not
working can u tell me why..
here is complete code.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " layout="vertical"
creationComplete="{init()}">

<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection; 
import mx.controls.Alert; 
[Bindable] 
public var arrayCollection:ArrayCollection;
public function init():void
{
arrayCollection = new ArrayCollection();
var a:Object = new Object();
a.name = 'A1';
arrayCollection.addItem( a );


var b:Object = new Object();
b.name = 'B1';
arrayCollection.addItem( b );


var c:Object = new Object();
c.name = 'C1';
arrayCollection.addItem( c ); 


}

]]>
</mx:Script>


<mx:ComboBox dataProvider="{arrayCollection}" labelField="name"
width="200" > 
<mx:itemRenderer>
<mx:Component>
<mx:Label click="{mx.controls.Alert.show( data.name )}" text="{data.name
}" visible="false" enabled="false" mouseEnabled="false" />
</mx:Component>
</mx:itemRenderer> 
</mx:ComboBox>

<mx:Label text="Iam Disable" enabled="false" mouseEnabled="false"
click="{Alert.show('asdsa')}"/> 
</mx:Application>

 

Reply via email to