MATLAB Answers


Drag and drop onto a predetermined grid.

Asked by Tyler
on 21 Mar 2014
Latest activity Commented on by Tayler
on 11 Apr 2014

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?



No products are associated with this question.

1 Answer

Answer by Jan Simon
on 21 Mar 2014
 Accepted 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.

  1 Comment

on 11 Apr 2014

How would one go about making the grid for the images to be dropped on?

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!