Wednesday, May 13, 2009

What will happen on the end of a drag?

When a drag-drop operation ends, the target control is notified of the drop. The entire operation can be canceled by pressing the ESC button.

But when a docking operation ends, we should have more options. The "normal" end will dock the dragged component into the target host site, or the component will become (or stay) floating on the screen, or the entire operation will be aborted. The user should get enough visible feedback, so that he can know what will happen when he releases the mouse button. The following changes to the LCL are suggested:

A NoDrop cursor should be used, when nothing will happen on a drop. This kind of feedback is essential when the dragged component would be dropped onto itself, whereupon nothing should happen at all. This feature is not part of the Delphi/Lazarus drag-drop implementation, where the default docking object does not support state specific cursors, and the drag object has no property for an NoDrop state at all.

The Lazarus implementation also doesn't handle the CTRL key, for making a component float even if it moves over a dock site.

Now I hope that the according patches are added to the LCL soon...

No comments:

Post a Comment