| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Oct 2006
Posts: 7
|
In AIR, you can drag selected text and drop it into the same TextArea or into another TextArea (Or even outside of the AIR window). I would like to override or prevent this behavior, but I have not yet found a way.
It seems that this behavior is embedded in the TextField object. Is there anyone that can point me in the right direction? |
|
|
|
|
|
#2 |
|
Senior Member
|
This behavior is not specific to AIR. What you could do is just make the text non-selectable. But to have it selectable AND not dragable, I don't think is possible. I'll try some tests.
|
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
|
Okay, correction: it IS specific to AIR.
...working on solution, i'll get back to you. |
|
|
|
|
|
#4 |
|
Senior Member
|
Well, here's an idea. See what you can get from it.
ActionScript Code:
You'll just create two input text fields, tf1_txt and tf2_txt. Enter some data in the first text field (tf1_txt) then try to select and drag it to the second (tf2_txt). |
|
|
|
|
|
#5 |
|
Registered User
Join Date: Oct 2006
Posts: 7
|
Thanks for your input.
And you were in fact right initially when you claimed this not to be specific to AIR; this behaviour has been there all the time if the code was running in the Safari web browser (or so I've been told by Mac users). Eventually we solved it with a bit of a hack: We pick up the nativeDragDrop event and set the text of the target area back to what it was before the dragged text was dropped onto it. This does not prevent the user from dragging and dropping text but it at least prevents the effects from that action. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| calling a PDF file in Flash | AudryLucy | Projectors and CDs | 20 | 12-30-2006 02:43 PM |
| textArea Html Default Tags | LeahSmart | Components | 0 | 03-03-2006 12:14 PM |
| Disappearing Text From TextArea Component | linsula | Components | 0 | 06-15-2005 02:27 PM |
| textArea component not scrolling all the text | frank grimes | Components | 4 | 04-15-2005 12:19 AM |
| textarea, method to make the scrollbar auto-indent text, when no scrollbar present | 303 maddec | Components | 0 | 01-04-2005 07:48 PM |