List box Value Changed
Show older comments
This exact function works for my 1st list box i turned off 'enable' and set a condition that forces a selection to be made from list box so the push button is enable, but that isnt working for the other pushbuttons. i have attached the code
function ListBox_3ValueChanged(app, event)
value = app.ListBox_3.Value;
if strcmp(app.ListBox.Value,'Female')|| strcmp(app.ListBox.Value,'Male')||strcmp(app.ListBox.Value,'Intersex')||strcmp(app.ListBox.Value,'Non-conforming')...
||strcmp(app.ListBox.Value,'Gender-fluid')||strcmp(app.ListBox.Value,'Genderqueer')||strcmp(app.ListBox.Value,'Transgender');
set(app.NEXTButton_2,'Visibility','on')
set(app.NEXTButton_2,'Enable','on');
end % simple loop that allows the push button to stay disabled until the person selects an option.
end
4 Comments
Image Analyst
on 22 Nov 2022
Your code looks at the selection in ListBox_3 and enables the NextButton_2 and makes it visible if the ListBox_3 is one of those choices. It should work but I don't know what you want it to do or why it doesn't work in some cases. Attach your .mlapp file and tell us what to select/change to demonstrate your problem after you read this:
Nwasinachi
on 22 Nov 2022
Image Analyst
on 22 Nov 2022
I can't even get it to display the tabs. When I run it, they're chopped off. Look:

You see the tabs in Design View but when you actually run it the top part of the figure is chopped off!
Nwasinachi
on 22 Nov 2022
Edited: Nwasinachi
on 22 Nov 2022
Accepted Answer
More Answers (0)
Categories
Find more on Develop Apps Using App Designer 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!
