Clear Filters
Clear Filters

Why is the label not coming up?

3 views (last 30 days)
Muazma Ali
Muazma Ali on 7 Jun 2023
Answered: Kevin Holly on 7 Jun 2023
Hi
in app3 , the label is supposed to show 'choose two or three salts¨ when the user has not chosen any salts. But the label is not showing up when the user hasnt chosen anything. I put a condition of isempty for listbox value but it seems it is not working. And the while loop there is not working either. The code is supposed to show the picture of listbox with the the instruction in the label of choosing two to three salts , as many time as the nr of the variable called antall_soner from app2.
I am attaching app2 also which is the main app

Answers (1)

Kevin Holly
Kevin Holly on 7 Jun 2023
I made the default text for Label2, "Choose the salts available!". This way it appears when the app first starts. If you do not want it present during initialization, you can delete this.
If the user deselects everything in the listbox using "Ctrl+click", app.numSelected would be zero, but not empty. Therefore, I added this to your if condition:
|| app.numSelected==0

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!