Warning for uicontrol's ListboxTop value; listBox does not appear
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hallo everyone, this is my problem. i have a gui code that creates this .fig. The thing is that there sould be a listbox at the top left side of the window, next to the second one. At the command window there is a warning that says "Warning: This uicontrol's ListboxTop value (191) must be within the String range (1:57) Control will not be rendered until all of its parameter values are valid "
The thing is, that I have this problem only when using matlab2016a. In matlab2011a, there was no such a problem. Any ideas how to fix it?
thank you a lot.
0 Kommentare
Antworten (1)
PG_Dev
am 22 Nov. 2017
Bearbeitet: PG_Dev
am 24 Nov. 2017
Rania,
Good question.
Your current listbox in the GUI seems to have at-least 191 values but the second one has a max range of 57. Matlab GUI looks for the default value(or entry) which will be selected in the listbox before it creates it. You might have selected the 191st entry in the first listbox and that value could be taken by Matlab as the default selection value when it attempts to create it but you have populated the second listbox with only 57 values.
To workaround this issue, immediately after intializing (or re-intializing after you re-populate) any listbox (or also a pop-up/drop-down menu for that matter) use the following statement to reset the default selection to the first value.
set(Your_Listbox_Handle, 'Value', 1);
Let me know if it worked.
Regards
PG
0 Kommentare
Siehe auch
Kategorien
Mehr zu Software Development Tools finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!