Turn a checkbox green
5 次查看(过去 30 天)
显示 更早的评论
I have a uitable in a GUI I made in Matlab guide.
I want a checkbox to turn green when its 'checked', and turn back red if its unchecked.
I cannot find a child property for this simple sounding task.
0 个评论
采纳的回答
Evan
2013-7-1
编辑:Evan
2013-7-1
Using the Matlab properties of your checkbox, you can only change the color of the font ( ForegroundColor ) and it's highlighted color ( BackgroundColor ) for your checkbox. You cannot change the appearance of the box itself.
If you're wanting to accomplish an appearance change other than the two available modifications using the BackgroundColor and ForegroundColor properties, you'll have to modify Matlab's underlying Look-and-Feel. This will require quite a bit more work, but if you're interested, the below article may be of help:
2 个评论
Evan
2013-7-1
Oh, apologies. I misread your question. Modifying the checkbox appearance within a uitable would likewise require modifying the underlying Java, though I would imagine that the fact that you're working within a uitable would add another layer of complexity. UndocumentedMatlab would probably be your best resource for this task as well.
更多回答(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!