2010-06-15 34 views
0

我正在使用Flashbuilder 4.我有一個Spark TextInput控件,並且正在實現一個「複製」按鈕,該按鈕僅將此控件中的選定文本複製到剪貼板(非常像人民幣複製)。我該怎麼做呢?如何訪問Flex TextInput控件中的選定文本

感謝,

水稻

回答

0

試試這個:

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

工作了魅力,非常感謝Sophistifunk。 – Paddy 2010-06-16 18:03:00

相關問題