推广 热搜: 家装  卫浴洁具  家居  机械  装修  卫生间  隔断  卫浴  陶瓷  防水 

Flex组件中存在的问题总结

点击图片查看原图
 
单价: 面议
起订:
供货总量:
发货期限: 自买家付款之日起 3 天内发货
所在地: 北京
有效期至: 长期有效
最后更新: 2013-12-24 11:25
浏览次数: 45
询价
 
公司基本资料信息
详细说明
    在平时的Flex组件开发过程中遇到的问题:怎么在textarea的光标位置插入字符?
解决办法总结如下:
<mx:textarea id="textEditor"  x="11" y="366" width="399"/>
 
private function insertString(insertStr:String):void 
    if (this.textEditor.selectionBeginIndex == this.textEditor.selectionEndIndex) 
    { 
        var startPart:String=this.textEditor.text.substrin(0, this.textEditor.selectionBeginIndex);
        var endPart:String=this.textEditor.text.substrin(this.textEditor.selectionEndIndex, this.textEditor.text.length); 
        startPart+=insertStr; 
        startPart+=endPart; 
        this.textEditor.text=startPart; 
    } 
    else 
    { 
        this.textEditor.text=insertStr; 
    } 
}
 
更多相关产品资讯可以查询:flex 组件http://bbs.9ria.com/thread-75487-1-1.html
 
更多>本企业其它产品
Flex组件中存在的问题总结
网站首页  |  关于我们  |  联系方式  |  使用协议  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  RSS订阅  |  违规举报  |  粤ICP备14017808号
Powered By DESTOON