フィルターのクリア

How to make a DropDown function control the visibility of a spinner in App designer

2 ビュー (過去 30 日間)
anja pedersen
anja pedersen 2017 年 4 月 27 日
回答済み: Tushar Upadhyay 2017 年 5 月 2 日
Hi,
I am New to App Designer and i would like to make one item in the DroppDown function to make a spinner visible. Is this possible? What I have tried so far is this:
Value= app.InstrumentDropDown.Value;
if Value==1
app.AntalldypSpinner.Visible='off'
elseif Value==2
app.instrument='D';
app.AntalldypSpinner.Visible='on'
elseif Value==3
app.instrument='D';
app.AntalldypSpinner.Visible='off'
elseif Value==4
app.instrument='R';
app.AntalldypSpinner.Visible='off'
end
but this only make the spinner disappear and it never shows up again. Can someone help me?

回答 (1 件)

Tushar Upadhyay
Tushar Upadhyay 2017 年 5 月 2 日
The app.InstrumentDropDown.Value might be giving value in "char" instead of numeric. Make sure that the value is numeric. If it is a char then change the If statement as below:
if Value=='1' app.AntalldypSpinner.Visible='off'
If that does not work, then add the debug point in the function and see if it is going into the appropriate conditional statement.

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by