how to inhibit the user to move a figure?

Hello! Does anyone know how can I inhibit the user to move a figure or a GUI? Resize can be switched on or off, but I didn't find any equivalent option for motion property. Thanks!

 Accepted Answer

You could possibly add a listerner to the figure's position (or outerposition) property so that if it changes you reset it to where it was.

4 Comments

Mmm... it could work. Do you suggest me to program the listener as a neverending WHILE loop, or there is some dedicated function?
It works! Thank you Sean for the great suggestion!
Hi Andrea, what exactly did you implement? Did you ADDLISTENER? Is there a Java method for the figure?
No sorry, I meant to use the ADDLISTENER function that Jan mentioned. I should've (and thought I had) mentioned that in the original post.
doc addlistener

Sign in to comment.

More Answers (0)

Categories

Products

Tags

Asked:

on 8 Feb 2012

Edited:

on 6 Oct 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!