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

Thread Subject:
Callback function for changes of figure properties

Subject: Callback function for changes of figure properties

From: Adrian Wanner

Date: 23 Dec, 2009 15:08:04

Message: 1 of 2

Hi all,
I would like to set a callback function that is called whenever any property of a certain figure is changed (eg. if a the 'color' or 'position' property has changed, etc.). There is probably a Java-based solution. However, I couldn't figure it out so far. Any suggestions?
Cheers,
Adrian

Subject: Callback function for changes of figure properties

From: Yair Altman

Date: 15 Apr, 2010 07:29:04

Message: 2 of 2

"Adrian Wanner" <wannerad@ini.phys.ethz.ch> wrote in message <hgtbok$riv$1@fred.mathworks.com>...
> Hi all,
> I would like to set a callback function that is called whenever any property of a certain figure is changed (eg. if a the 'color' or 'position' property has changed, etc.). There is probably a Java-based solution. However, I couldn't figure it out so far. Any suggestions?
> Cheers,
> Adrian

You can use the PropListener utility from the Matlab File Exchange:
http://www.mathworks.com/matlabcentral/fileexchange/18301-proplistener-add-a-callback-to-property-value-getset-event

PropListener uses the undocumented handle.listener function, which is described here:
http://UndocumentedMatlab.com/blog/continuous-slider-callback/#Property_Listener

Yair Altman
http://UndocumentedMatlab.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us