Flex组件中存在的问题总结

点击图片查看原图
 
单价: 面议
起订:
供货总量:
发货期限: 自买家付款之日起 3 天内发货
所在地: 默认地区
有效期至: 长期有效
最后更新: 2013-12-24 11:25
浏览次数: 21
询价
详细说明
    在平时的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
 
更多>本企业其它产品
公司基本资料信息
最新建材产品
点击排行
推荐资讯
最新
模具头条 | 水泥头条 | 家装之家 | 涂料之家 | 家具之家 | 饰品之家 | 隔断之家 | 灯具头条 | 门窗头条 | 智控链 | 老姚之家 | 灯饰之家 | 电气之家 | 全景头条 | 照明之家 | 防水之家 | 防盗之家 | 区快洞察 | 锦州建材 | 丹东建材 | 本溪建材 | 抚顺建材 | 鞍山建材 | 西安建材 | 商洛建材 | 安康建材 | 榆林建材 | 汉中建材 | 延安建材 | 渭南建材 | 咸阳建材 | 宝鸡建材 | 铜川建材 | 兰州建材 | 甘南建材 | 临夏建材 |
建材 | 企业之家 | 移动社区 | 关于我们  |  联系方式  |  使用协议  |  版权隐私  |  网站地图 | 排名推广 | 广告服务 | 积分换礼 | RSS订阅 | sitemap |
(c)2015-2017 Bybc.cn SYSTEM All Rights Reserved 网站地图
Powered by 家居头条