From: Muhammad on 3 Apr 2010 23:12 Dear Zhang How can I make a static text like e text box can be write freely? Thanks "Matthew Whitaker" <mattlwhitaker(a)REMOVEgmail.com> wrote in message <hdeoko$ind$1(a)fred.mathworks.com>... > "Zhang Michael" <cy_xiaoxiao(a)hotmail.com> wrote in message <hdehg4$e2l$1(a)fred.mathworks.com>... > > Hi. > > > > I am designing a matlab GUI. And I add a Static Text Component in the GUI. Now I want to let Static Text show 'β'. I know may be I can use latex to make it show 'β'. However, when I change the component's String property to \beta, the character 'β' doesn't show up. > > Is there any way to let Static Text Component show math symbols? > > > > Thanks > > If I have to any non-trivial formatting of the static text I usually use a java JLabel instead and place using java component. This will support HTML text: > %show the 'for all' and 'beta' symbols > t = javaObjectEDT('javax.swing.JLabel','<html>∀β</html>'); %note if using earlier than R2008 see awtCreate or create directly (slightly more risky) > h = figure; > [hcomponent,hcontainer] = javacomponent(t,[100,100,40,20],h); > > A good reference for the HTML symbols can be found at: > http://www.w3schools.com/tags/ref_symbols.asp > > Hope this was helpful > Matt W
From: Muhammad on 3 Apr 2010 23:12 "Matthew Whitaker" <mattlwhitaker(a)REMOVEgmail.com> wrote in message <hdeoko$ind$1(a)fred.mathworks.com>... > "Zhang Michael" <cy_xiaoxiao(a)hotmail.com> wrote in message <hdehg4$e2l$1(a)fred.mathworks.com>... > > Hi. > > > > I am designing a matlab GUI. And I add a Static Text Component in the GUI. Now I want to let Static Text show 'β'. I know may be I can use latex to make it show 'β'. However, when I change the component's String property to \beta, the character 'β' doesn't show up. > > Is there any way to let Static Text Component show math symbols? > > > > Thanks > > If I have to any non-trivial formatting of the static text I usually use a java JLabel instead and place using java component. This will support HTML text: > %show the 'for all' and 'beta' symbols > t = javaObjectEDT('javax.swing.JLabel','<html>∀β</html>'); %note if using earlier than R2008 see awtCreate or create directly (slightly more risky) > h = figure; > [hcomponent,hcontainer] = javacomponent(t,[100,100,40,20],h); > > A good reference for the HTML symbols can be found at: > http://www.w3schools.com/tags/ref_symbols.asp > > Hope this was helpful > Matt W
|
Pages: 1 Prev: Convert MGRS to Latitude/Longitude and vice versa Next: solving equations with a matrix |