MATLAB: Drag and drop onto a predetermined grid.

drag dropgui

My current project is to design a GUI that allows users to create a series piping system with pumps, valves, connectors, and other things. What I would like to do is have all the possible parts shown on the side and then have the user drag them onto a grid where they would snap into place. Is there something in MATLAB that would allow me to do this or would I have to track where the piece is and manually tell it what position to snap to?

Best Answer

I do not know a method, which does this automatically. But snapping is easy, because you only have to find the nearest matching location.
Related Question