Set GUI button colors in GUIDE
조회 수: 19 (최근 30일)
이전 댓글 표시
How can I modify the property in the property inspector in GUIDE (so I don't have to go through all my code) to modify the toggle button behavoir so it is the default gray when it is up, and green when it is toggled down?
댓글 수: 0
채택된 답변
Walter Roberson
2013년 2월 22일
That cannot be done through the property inspector.
In order to change the color of the toggle button, you need to set the CData property to be a truecolor image of whatever shape and color is appropriate for the current state. There is only one CData property, not one for "on" and one for "off", so you need to have code to set() the CData property differently as the state changes.
댓글 수: 0
추가 답변 (1개)
Image Analyst
2013년 2월 22일
I think that might be controlled by the operating system. Maybe there's a way around it though. You can look here: http://undocumentedmatlab.com/?s=button+color
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!