How to assign different color to items in drop-down list in app designer?
19 次查看(过去 30 天)
显示 更早的评论
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 个评论
Reshma Nerella
2022-4-12
移动:Adam Danz
2023-3-17
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.
采纳的回答
Jasmine Poppick
2023-3-17
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!