Change Color of each individual item in a Listbox (using APP designer)
49 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
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 list box. For example:
s = uistyle(BackgroundColor="yellow");
addStyle(app.ListBox,s,"item",2)
0 个评论
更多回答(2 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!