This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Create pointer manager in figure


iptPointerManager(hFigure, 'disable')
iptPointerManager(hFigure, 'enable')


iptPointerManager(hFigure) creates a pointer manager in the specified figure. The pointer manager controls pointer behavior for graphics objects in the figure that contain pointer behavior structures. Use iptSetPointerBehavior to associate a pointer behavior structure with a particular object to define specific actions that occur when the mouse pointer moves over and then leaves the object. See iptSetPointerBehavior for more information.

iptPointerManager(hFigure, 'disable') disables the figure's pointer manager.

iptPointerManager(hFigure, 'enable') enables and updates the figure's pointer manager.


If the figure already contains a pointer manager, iptPointerManager(hFigure) does not create a new one. It has the same effect as iptPointerManager(hFigure, 'enable').


Plot a line. Create a pointer manager in the figure. Then, associate a pointer behavior structure with the line object in the figure that changes the mouse pointer into a fleur whenever the pointer is over it.

 h = plot(1:10);
 enterFcn = @(hFigure, currentPoint)...
             set(hFigure, 'Pointer', 'fleur');
 iptSetPointerBehavior(h, enterFcn);


iptPointerManager considers not just the object the pointer is over, but all objects in the figure. iptPointerManager searches the HG hierarchy to find the first object that contains a pointer behavior structure. The iptPointerManager then executes that object's pointer behavior function. For example, you could set the pointer to be a fleur and associate that pointer with the axes. Then, when you slide the pointer into the figure window, it will initially be the default pointer, then change to a fleur when you cross into the axes, and remain a fleur when you slide over the objects parented to the axes.

Introduced in R2006a

Was this topic helpful?