flex edit menu operations on multiple textareas

2019-07-23 14:55发布

I have a grid in which one column is having itemrenderer as textarea. My application is menu controled. Now I want to perform edit operations on the textarea using menu items.

Like if I select some text from a textarea in the grid, then I select a menu item "Cut" then it should cut the selected text from the textarea. In this manner I would lie to perform all operations.

I am not getting how to get that the operation is to be performed on which textarea?

标签: flex3 air
1条回答
▲ chillily
2楼-- · 2019-07-23 15:30

inside your menu item click handler, try:

var fcs:IFocusManagerComponent = focusManager.getFocus();
if(fcs is TextArea)
{
    var txt:String = TextArea(fcs).text;
    System.setClipboard(txt);
}
查看更多
登录 后发表回答