How to assign different color to items in drop-down list in app designer?
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Nachiket Wadwankar
il 11 Mar 2022
Is it possible to provide different color to individual item in a drop-down list in app designer?
I have multiple entires in my drop down list. I want to assign either red or green font color to indiviual drop-down item based on my requirement.
How to do this?
2 Commenti
Reshma Nerella
il 12 Apr 2022
Spostato: Adam Danz
il 17 Mar 2023
Currently we do not support changing the color of individual items in drop down list in App Designer. I have brought this issue to the notice of the concerned people and it might be considered for a future release.
Risposta accettata
Jasmine Poppick
il 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 drop-down component. For example:
s = uistyle(BackgroundColor="green");
addStyle(app.DropDown,s,"item",2)
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!