• 信息
  • 详情
  • 问答
  • 联系
  • 推荐
发送询价分享好友 产品库首页 产品库分类 切换频道
1/5
Flex组件中存在的问题总结图1

Flex组件中存在的问题总结

2013-12-24 11:25江苏8660询价
价格 面议
发货 付款后3天内  
该产品库存不足
产品详情
    在平时的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
 
点赞 0
举报
收藏 0
评论 0
分享 2
更多相关问答
暂无问答,点这里提问
联系方式


登录注册 后查看联系方式