I am working on making a type of drawing program, but I have run into a bit of a snag and I don't know how to get past it. It's a very simple problem.
I have made my Flex 3 application able to have a button, and when you click it, it adds a UITextField programmatically. The problem is that I don't know how to get it so that it can be draggable. Do I need to stick it in a Sprite? It doesn't have the method available to simple startDrag. Do I need to stick it inside some type of container? If so, what kind of container does it need? Can you give me an example of how the code should look?
I have searched all over. I could not find a solution. I would appreciate any help. Thanks in advance!
I'm new to Flex so don't know about draggable text boxes.
Here are links to two solutions for draggable panels. The first example has a text box in the draggable panel.
Hope it helps.
I'm wondering why you are using UITextField instead of Text or TextArea. I thought UITextField was used internally by Flex.
Anyway, only some List based components support drag and drop. You may need to add drag and drop support manually.
Also, if you are dragging objects into auto-layout containers such as HBox, VBox, Panel or Application (with layout property set to vertical or horizontal), etc. you might not get the behavior you want, so you might want to use Canvas, or Panel or Application (with layout property set to absolute).
Here is a link on implementing drag and drop manually.
If this post answers your question or helps, please mark it as such.