This is a migrated thread and some comments may be shown as answers.

Drag and Drop Text Controls

1 Answer 76 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 11 May 2009, 12:23 AM
I am needing to build up a run time form designer using a database that contains different type of UI elements (text box, check box, label, combo box, radio button, picture object, and calendar) and I want the ability to drag the object around on a panel. When I stop dragging, I want to set the margin to display on the panel where I stopped dragging the item.  Is there an example of how to do this simply?

1 Answer, 1 is accepted

Sort by
0
Miroslav Paskov
Top achievements
Rank 1
answered on 11 May 2009, 12:51 PM
Hi Eric,

What you need is achievable, but unfortunately button elements cannot be dragged/dropped because they capture the mouse on MouseDown (this is a limitation for the time being). Generally only the buttons (CheckBox, Button, RepeatButton, etc) capture the mouse.

You may need to use placeholders for the buttons that are dragged (on drop you can place an actual button).

It is possible to drag elements to, from and in a panel, I will post an example later as well.

Greetings,
Miroslav
Tags
DragAndDrop
Asked by
Eric
Top achievements
Rank 1
Answers by
Miroslav Paskov
Top achievements
Rank 1
Share this question
or