views:

293

answers:

1

Hi,

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?

A: 

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

related questions