How to change UI according to input argument?

1 回表示 (過去 30 日間)
Dapeng Liu
Dapeng Liu 2020 年 5 月 9 日
コメント済み: Dapeng Liu 2020 年 5 月 17 日
Hi,
I am a beginner in GUI. I am trying to make a multi-dimensional image viewer with app designer.
My question is: is it possible to change the UI according to input argument? For example, I want to input a N-D image and if the image is 2D, no slider; if the image is 3D, one slider to change the slice; if the image is 4D, two sliders...
In addition, I also want to make sure the label of the slider is corresponding to the length of the particular dimension of the image.
Is that possible in app designer? Imam using MATLAB2020.
Thanks!
Dapeng
  2 件のコメント
Geoff Hayes
Geoff Hayes 2020 年 5 月 11 日
Dapeng - if your app already has the sliders (are there just at most two?) then you can hide them by setting the Visible property from "on" to "off" (or to make them re-appear, just set to "on") given the dimensions of the input array.
Dapeng Liu
Dapeng Liu 2020 年 5 月 17 日
Uh I see. Yes that should work. Thanks!

サインインしてコメントする。

採用された回答

Harsha Priya Daggubati
Harsha Priya Daggubati 2020 年 5 月 12 日
Hi,
Adding to what is already answere, you can also change the Limits (I guess in your case label of the slider) to suit the image size, using 'Limits' property of the slider.
You can refer to the following link for information about slider properties:
  1 件のコメント
Dapeng Liu
Dapeng Liu 2020 年 5 月 17 日
I will try it. Thanks!

サインインしてコメントする。

その他の回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by