![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/329843/image.png)
Unable to disable axes interactions
8 次查看(过去 30 天)
显示 更早的评论
I would like to disable all default uiaxes interactions and only be able to interact with the axes through the toolbar. Here is my code for doing so:
fig = uifigure;
ax = uiaxes(fig);
ax.Interacations = [];
This works as expected. However, after I pan my axes from the toolbar (toggle the hand icon to on -- pan -- toggle the hand icon to off), the interactions get re-enabled with the ruler objects and after I interact with the ruler object I am able to repeat the pan while interacting with the main axes object.
To me this seems like a bug.
Thanks.
0 个评论
回答(1 个)
Gouri Chennuru
2020-7-10
Hi Paul,
I am assuming that you are using MATLAB R2020a, I couldn't reproduce the issue, I tried following the below steps,
Initially I executed,
fig = uifigure;
ax = uiaxes(fig);
This works fine and all the default interactions are also working fine. Default Interactions are built into the axes and are available through gestures, such as dragging to pan or scrolling to zoom.
In the next step I executed,
ax.Interactions = [];
This also works fine, the default interactions are disabled as expected, Only the default interactions are disabled not the toolbar interactions. (Toolbar interactions are available through the axes toolbar as shown)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/329843/image.png)
On checking the toolbar interactions(tried Pan on and off) they are working fine but the default interactions are not enabled as expected thus, not able to reproduce the issue you have got.
Can you provide additional information so that I will try to reproduce this issue?
2 个评论
Gouri Chennuru
2020-7-13
Hi Paul,
I am able to reproduce the issue.
I have brought this issue to the concerned people and it might be considered in any future release.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!