Main.mxml
-------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="setData()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
public var arr:ArrayCollection
public function setData():void
{
arr =new ArrayCollection()
for(var i:int=0;i<7;i++)
{
arr.addItem({man:"image",id:i})
}
tl.dataProvider=arr;
}
public function saveChange(ix:Number,val:String):void
{
arr.getItemAt(ix).label=val;
}
]]>
</mx:Script>
<mx:TileList x="172" y="144" width="427" id="tl" itemRenderer="MyText"></mx:TileList>
</mx:Application>
MyText.mxml (itemRenderer)
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="108" height="104">
<mx:Script>
<![CDATA[
[Bindable]
public var _txt:String;
[Bindable] public var _ix:Number
override public function set data(data:Object):void
{
_txt=data.man
_ix=data.id
}
private function showEditor():void
{
lbl.visible=false
ti.visible=true;
}
private function saveIt():void
{
lbl.text=ti.text;
ti.visible=false
lbl.visible=true
parentApplication.saveChange(_ix,ti.text)
}
]]>
</mx:Script>
<mx:Label x="10" y="36" width="89" id="lbl" click="showEditor()" text="{_txt}"/>
<mx:TextInput x="10" y="32" width="88" id="ti" visible="false" enter="saveIt()" text="{_txt}" focusOut="saveIt()" mouseDownOutside="saveIt()"/>
</mx:Canvas>
Click on the text to pop a textinput to edit, on enter the value is committed. the focus handling is not completely done.
Hope this helps
Harish
On 9/18/06, graysonpierce <[EMAIL PROTECTED]> wrote:
Hello,
I was expecing to find a editable="true" on the HorizontalList just
like on a vertical list.
Are there any work-arounds to being able to edit the text of list
members in a HorizontalList?
Thanks,
Gray
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Software development tool Software development Software development services Home design software Software development company
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
- [flexcoders] horizontallist editable="true&qu... graysonpierce
- Re: [flexcoders] horizontallist editable=&quo... Harish Sivaramakrishnan
Reply via email to

