Change Color of each individual item in a Listbox (using APP designer)
40 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ma Yuelin
le 26 Jan 2022
Réponse apportée : Jasmine Poppick
le 17 Mar 2023
I want to know how to change the color of each individual item in a Listbox. I know there are some solutions using uicontrol, but I want to know how to do it in APP designer.
0 commentaires
Réponse acceptée
Jasmine Poppick
le 17 Mar 2023
In the StartupFcn callback of the app, you can create a style using uistyle and specify the BackgroundColor property, and then add the style to an item of the list box. For example:
s = uistyle(BackgroundColor="yellow");
addStyle(app.ListBox,s,"item",2)
0 commentaires
Plus de réponses (2)
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!