GUI radio button
조회 수: 4 (최근 30일)
이전 댓글 표시
Is it possible to use the radio button to indicate if something is on or off? Right now, whne someone select the radio button it turned green. So for example, I want it to lit green when it's on and red when it's off. How would I go about changing the color of the radio button? How do I get it have to be select all the time. I couldn't find anything in help so I don't know if it's possible. If there is a better way than using radio button, much appreciate. Thanks.
댓글 수: 0
답변 (2개)
Daniel Armyr
2011년 2월 7일
Sure you can. Just set the Value property of the radio button to 0 or 1 depending on what you want. To make sure the user doesn't change the value for you, set the Enable property to 'inactive'. That way, the radio button will look like normal, but clicking it won't make a difference.
Another way (Not tested by me) would be to place a small square panel and then change the collor from say green to red. That should be very clear to the user.
댓글 수: 0
Walter Roberson
2011년 2월 7일
I don't believe you can control the button color independently of the color of the uicontrol (unless perhaps it is possible using Java.) You can set the color of the uicontrol using the Backgroundcolor property.
Note: the uicontrol Foregroundcolor property does not control the button color: it controls the color of any text you associate with the control.
댓글 수: 0
참고 항목
카테고리
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!