Change Color of each individual item in a Listbox (using APP designer)
조회 수: 44 (최근 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!