【问题标题】:How to access the selected text in a Flex TextInput control如何访问 Flex TextInput 控件中的选定文本
【发布时间】:2010-06-16 09:13:05
【问题描述】:

我正在使用 Flashbuilder 4。我有一个 Spark TextInput 控件,并且我正在实现一个“复制”按钮,该按钮将仅从该控件中将选定的文本复制到剪贴板(与 RMB Copy 非常相似) .我该怎么做?

谢谢,

稻田

【问题讨论】:

    标签: apache-flex


    【解决方案1】:

    试试这个:

    var beginIndex:int = Math.min(myTextInput.textDisplay.selectionActivePosition, myTextInput.textDisplay. selectionAnchorPosition);
    var endIndex:int = Math.max(myTextInput.textDisplay.selectionActivePosition, myTextInput.textDisplay.   selectionAnchorPosition);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-06
      • 1970-01-01
      • 2012-03-09
      • 2021-12-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多