Multi-colored pop-up menu entries

조회 수: 5 (최근 30일)
Matt J
Matt J 2013년 6월 11일
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...)

채택된 답변

Hugo
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 CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by