Limiting UIAxes Interactivity in AppDesigner

조회 수: 49 (최근 30일)
Veena Chatti
Veena Chatti 2020년 9월 12일
댓글: Adam Danz 2022년 8월 25일
Hi!
I'm using three UIAxes to display plots, and I'd like to be able to limit their interactivity such that the zoom in/out, and save/export buttons neither appear nor work. Are there commands to enable/disable these in AppDesigner?
Thanks in advance for your suggestions!

채택된 답변

Adam Danz
Adam Danz 2020년 9월 13일
편집: Adam Danz 2020년 9월 13일
The first line below turns off default interactivity and the second line turns off the toolbar options.
disableDefaultInteractivity(app.UIAxes)
app.UIAxes.Toolbar.Visible = 'off';

추가 답변 (2개)

Mario Malic
Mario Malic 2020년 9월 12일
편집: Mario Malic 2020년 9월 13일
I am not aware of the option to save/export fig in App Designer.
For limiting interactivity:
ax = app.UIAxes; % change to your UIAxes handle
ax.Interactions = [panInteraction];
ax.Toolbar.Visible = 'off';
  댓글 수: 7
Mario Malic
Mario Malic 2020년 9월 13일
I sourced my information from UIAxes properties which also mentioned disableDefaultInteractivity, but didn't checked it.
"I enjoy and learn from other people's approaches such as this one." - Likewise!
Veena Chatti
Veena Chatti 2020년 9월 22일
Thank you both for your inputs! I found that Adam's answer worked!

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


Bruno Gonfiotti
Bruno Gonfiotti 2020년 9월 18일
I tested the solutions here proposed, but in Matlab 2020b I get the following error: Invalid or deleted object. Error in disableDefaultInteractivity (line 12). ax.InteractionContainer.Enabled = 'off';
Do you have any suggestion?
  댓글 수: 8
Ioannis
Ioannis 2022년 8월 24일
이동: Adam Danz 2022년 8월 25일
How can I use disableDefaultInteractivity for all the functions?
Adam Danz
Adam Danz 2022년 8월 25일
@Ioannis, can you explain what you mean by "functions"? Do you mean interactions? What interactions still existed after executing disableDefaultInteractivity?

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

카테고리

Help CenterFile Exchange에서 Interaction Control에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by