Prevent a figure/axis from being made current manually

Is there a way to disable the ability of the figure window to automatically become the current figure when a manual user action brings it into focus? I would like to open a figure window or axis which will only be the target of a plotting command when the user explicitly provides a handle to the figure or axis. I know there is a way to do this with GUIDE GUIs and presumably with App Designer GUIs as well, but I would like to do it for any run-of-the mill figure.

댓글 수: 3

How would you do it for GUIDE ? You can turn off all of the PickableParts, but that does not prevent the figure from gaining focus when the border is clicked ?
There is a GUI Options dialogue that let's you select this. I assume it is setting some combination of figure properties to make this happen, but I don't know which ones.
that wording looks like handle visibility??

댓글을 달려면 로그인하십시오.

 채택된 답변

Matt J
Matt J 2020년 10월 22일
편집: Matt J 2020년 10월 22일

1 개 추천

Like Walter mentioned, setting the figures HandleVisibility to off seems to do the job.

추가 답변 (1개)

Mario Malic
Mario Malic 2020년 10월 22일
편집: Mario Malic 2020년 10월 22일

0 개 추천

This might be what you're looking for.
HitTest — Ability to become current object 'on' (default) | on/off logical value Ability to become current object, specified as 'on' or 'off', or as numeric or logical 1 (true) or 0 (false). A value of 'on' is equivalent to true, and 'off' is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.
'on' — Sets the current object to the Figure when the user clicks the component in the running app. Both the CurrentObject property of the Figure and the gco function return the Figure as the current object.
'off' — The current object does not update when the user clicks the figure in the running app.

댓글 수: 1

Matt J
Matt J 2020년 10월 22일
편집: Matt J 2020년 10월 22일
No, unfortunately that does not seem to have the desired effect for ordinary figures.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2020년 10월 22일

편집:

2020년 10월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by