I have created a ResizeableTitleWindow class which extends Titlewindow (to make it resizeable). Inside the RTW I add a TextArea and display the RTW as a PopUp. How do I add drag&drop to the TextArea?
public function createPopUpEdit():void {
var rtw:ResizableTitleWindow = new ResizableTitleWindow();
var st:TextArea = new TextArea();
rtw.addElement(st);
PopUpManager.addPopUp(rtw, this, false);
PopUpManager.centerPopUp(rtw);
Usually you do this by setting properties in the .mxml file:
<s:TextArea id="st"
dropEnabled="true"
dragOver="onlyAllowCopyDragOverHandler(event)"
dragDrop="myComponent_dragDropHandler(event)"
...
But in this case st is not defined in the mxml, but created with "new":
var st:TextArea=new TextArea();
I want to do something like this in my createPopUpEdit function:
st.dropEnabled="true";
st.dragOver="onlyAllowCopyDragOverHandler(event)";
etc.