MATLAB: Static text and greek letter

greekgreek letter static text

Hi,
how can I easy write "Set omega" into static text in GUI, where omega should be a greek letter?
Thanks for help

Best Answer

The easiest is to use a text() control instead of uicontrol('Style','text'). For text() controls, see http://www.mathworks.co.uk/matlabcentral/answers/14751-greek-alphabet-and-latex-commands-not-a-question
If you must use a uicontrol, then unless there is a method at the java level, you cannot do it with Style 'text' or 'edit'. You can, however, use 'style' 'Push' with 'enable' 'off', and then use html, such as
h = uicontrol('Style', 'push', 'enable', 'off', 'units', 'norm', 'position', [0 0 1 .1], 'String','<FONT COLOR="red">hello &omega;')