How to assign different color to items in drop-down list in app designer?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nachiket Wadwankar
el 11 de Mzo. de 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 comentarios
Reshma Nerella
el 12 de Abr. de 2022
Movida: Adam Danz
el 17 de Mzo. de 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.
Respuesta aceptada
Jasmine Poppick
el 17 de Mzo. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!