flex edit menu operations on multiple textareas

不打扰是莪最后的温柔 提交于 2019-12-24 11:37:28

问题


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?


回答1:


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);
}


来源:https://stackoverflow.com/questions/717116/flex-edit-menu-operations-on-multiple-textareas

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!