Multi-colored pop-up menu entries
4 次查看(过去 30 天)
显示 更早的评论
Is there a way to make a gui pop-up menu display its list of selections with different text colors? What about different fonts and typesetting (Italics, Boldface, etc...)
0 个评论
采纳的回答
Hugo
2013-6-11
Yes, try this:
uicontrol('style','popup','string',{'<FONT COLOR="red" SIZE="10" FACE="ARIAL">*_Here_*','<FONT COLOR="blue" SIZE="4" FACE="Courier">*There*','<FONT COLOR="maroon" SIZE="6" FACE="GEORGIA">Anywhere'})
Basically, I'm just using HTML. Take a look at each element in the cell of strings. Here is the first one.
'<FONT COLOR="red" SIZE="10" FACE="ARIAL">*_Here_*'
There are many ways you can format text in HTML. You can find that in google, but if you have no idea at all, you can start by taking a look at http://www.tizag.com/htmlT/font.php and then try to find other more complete tutorials if you need so.
Hope this helps. Best regards
更多回答(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!