In a video inserted in a UIAxis, fix the position once the app running and also, delete the edit buttons of zoom, pan, home...

I am working in App Designer by adding a video into a UIAxis by doing a parent. The problem is that when I run the program, the video is not fixed and it can disapear by moving it. Also, I would like to delete the edit buttons that are normal to the axis, as zoom, pan, home...

 Akzeptierte Antwort

You can uncheck "Toolbar:Visible" under app.UIAxes within the Component Browser. See image below.

11 Kommentare

Is there any command in order to fix the position and all the parameters of a UIAxis. Because once the graph is generated, in my case I represent a video, if the user moves the element, it is not fixed.
By "moves the element", are you talking about adjusting the UIFigure (The app's window in this case)? Or does the UIAxes change itself? How are you displaying the video? Are you using VideoReader or generating your own 3D/4D matrix? Does you UIAxes have visible ticks or is the axis off?
If you UIAxes is moving when you adjust the UIFigure, you could you a gridlayout.
If your y or x axis is changing, you can turn the axis off or set x or y limits.
I am playing a video by reading it with VideoReader and imshowing the frames in a UIAxis, app.Video_1.
But, once running the program, this video can be moved wherever.
Thank you!
If you want to move the UIAxes programmatically, you can change the position with
app.UIAxes.Position = [x y width height];
where x and y are the coordinates of the axes' bottom left corner. The units of the coordinate system can be view/changed with:
app.UIAxes.Units
Sorry Kevin I think I haven't expressed well the issue. The problem is that once running the app in Matlab, the user can click on the video inside the UIAxis and the video is moving, showed in the previous photos. What I want is to not allow this movements, so I have to fix limits or something like that?
Please see the attached app.
I displayed a video on a uiaxes and a uiimage. I unchecked Toolbar.Visible for the uiaxes. When I run the app, I cannot click and move the video within the uiaxes. The only time it moves is when I adjust the window. In this case, uiimage performs better. Note, I am using R2023a. Let me know if you still have the issue with this app.
Perfect! I'll check your configuration of the uiaxis. The problem of the adjust of the window is not a problem as I don't let the user to resize. Thank you!
And another question. Your video has 30 frames/second and in the if bucle you are imshowing every 0.13 seconds. Where is it coming from this value?
I got it from your previous comment. I was trying to mimic your problem.
Okey! Perfect! Doing it as an image works much better. Problem of movement solved. Thank you very much!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2020a

Gefragt:

am 21 Apr. 2023

Kommentiert:

am 27 Apr. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by