MATLAB: Creating a Popupmenu & UImenu with Interpreter ‘Tex’

latexMATLABtexuicontroluimenu

Hi,
I would like to incorporate 'tex' string in a UIControl popupmenu.
I know that UIControl does not support 'tex' or 'Latex' interpreter, however is there a way to cast a text or annotation object
so it can be used as the string property of my UIcontrol Object?
Otherwise, does anyone has a suggestion about how one might go about creation a popupmenu-like UI object that would be able to interpret my strings as 'tex'.
(I have the same question about UIMenu?)

Best Answer

uicontrol() objects (which are only for "traditional" figures) use Java underneath. The details of what they use depends upon the kind of control. uicontrol 'edit' and 'text' are handled a different way than radio, push, check, popup, and listbox, and all of the second group accept HTML 1.1 (but not later). For example,
h = uicontrol('style','pop','string', {'<HTML>A<sub>B', '<HTML>P&#140;Q'})
Sometimes encoding in HTML is good enough .
In cases where it is not good enough, then you need to go down into the Java objects and change them. http://undocumentedmatlab.com has relevant code.