FR: set relative position of startDragging image to cursor


Hi! As the thread title says, i’d like to be able to set the position of the drag image around the mouse cursor when startDragging is called. I’d like to show a preview of the Control widget that will be created when the object is dropped onto the target panel. At the moment, the image doesn’t accurately show where the Control will be dropped, depending on where the mouseDown started on the drag source.


Good suggestion, but would it perhaps be better done the other way round: if the target can find out where the bounds of the dragged image are in relation to the mouse, then it knows where to show its preview. That way when you start dragging, the image won’t jump as it would if you set the position.


i’ve instead decided to paint a rectangle on the target panel component, indicating the bounds of the drop. This makes more sense here anyway, as the preview image wouldn’t have been totally indicative of what the created on would look like. I guess i could create the resulting component when the drag starts, and drag that instead, but i think this current system is ideal.