MATLAB: Multi-colored pop-up menu entries

guihtmltext color

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…)

Best Answer

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