28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gco<br />

2gco<br />

Purpose Return handle of current object<br />

Syntax h = gco<br />

h = gco(figure_handle)<br />

Description h = gco returns the handle of the current object.<br />

2-958<br />

h = gco(figure_handle) returns the value of the current object for the figure<br />

specified by figure_handle.<br />

Remarks The current object is the last object clicked on, excluding uimenus. If the mouse<br />

click did not occur over a figure child object, the figure becomes the current<br />

object. MATLAB stores the handle of the current object in the figure’s<br />

CurrentObject property.<br />

The CurrentObject of the Current<strong>Figure</strong> does not always indicate the object<br />

whose callback is being executed. Interruptions of callbacks by other callbacks<br />

can change the CurrentObject or even the Current<strong>Figure</strong>. Some callbacks,<br />

such as CreateFcn and DeleteFcn, and uimenu Callback, intentionally do not<br />

update Current<strong>Figure</strong> or CurrentObject.<br />

gcbo provides the only completely reliable way to retrieve the handle to the<br />

object whose callback is executing, at any point in the callback function,<br />

regardless of the type of callback or of any previous interruptions.<br />

Examples This statement returns the handle to the current object in figure window 2:<br />

h = gco(2)<br />

See Also gca, gcbo, gcf<br />

The root object description<br />

“Finding and Identifying Graphics Objects” for related functions

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!