|
"Hans " <jyde_6@msn.com> wrote in message <hj69hu$1rn$1@fred.mathworks.com>...
> "Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message <hj4qf1$9c7$1@fred.mathworks.com>...
> > "Steven Lord" <slord@mathworks.com> wrote in message <hj4iij$2bm$1@fred.mathworks.com>...
> > >
> > > "Hans " <jyde_6@msn.com> wrote in message
> > > news:hj3jqp$8e7$1@fred.mathworks.com...
> > > > "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message
> > > > <hj1eif$chl$1@fred.mathworks.com>...
> > >
> > > *snip*
> > >
> > > > Thank very much for taking time to help me. Sorry for confusing you. I
> > > > will try to explain my problem again. I have a gui and I want to make a
> > > > string that is output in a text window. I can not get it to show the alpha
> > > > symbol?
> > >
> > > Uicontrols do not have an Interpreter property and so cannot interpret TeX
> > > commands.
> > >
> > > Text objects do have an Interpreter property and so can interpret TeX in
> > > their String property.
> > >
> > > http://www.mathworks.com/access/helpdesk/help/techdoc/infotool/hgprop/text_frame.html
> > >
> > > But note that text objects can't be children of a figure window (like
> > > uicontrols can), but must be a child of an axes, hggroup, or hgtransform
> > > object as documented in the description of the Parent property.
> > >
> > > --
> > > Steve Lord
> > > slord@mathworks.com
> > > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> >
> >
> > I am not exactly sure what the OP meant:
> >
> > 1. You can create an axes and use the \alpha Tex notation in the text() function. The axes background and borders can be made transparent, which enables displaying Tex labels anywhere in your figure (but beneath uicontrols).
> > 2. Alternately, you can use a Matlab button uicontrol, and set the alpha symbol using HTML (alpha = 945;), as explained here: http://undocumentedmatlab.com/blog/html-support-in-matlab-uicomponents/
> > 3. Alternately, you can use a Java JLabel control, and set the alpha symbol using HTML, as explained here: http://undocumentedmatlab.com/blog/customizing-matlab-labels/
> > 4. Alternately, you can display the alpha symbol within an HTML-based edit-pane, as explained here: http://undocumentedmatlab.com/blog/gui-integrated-html-panel/
> >
> > There are several other variants, but these should be sufficient for most use-cases.
> >
> > Yair Altman
> > http://UndocumentedMatlab.com
>
> Dear Yair and Steve
>
> Thank you for taking time to help me. As I understand uicontrol cannot show symbols. In my example I have a GUI with a list box where different options can be choosed. The options are then shown in a textbox when I press the pushbutton. Can you come up with an example how to solve my problem soo symbols can be shown in the textbox?Yair can you show me two examples with option 1 and 2 that you mentioned or maybe one of the others? I do not have experience with Java programming. Hope the example under can shown what I want.
>
> function test6()
>
>
> % global vectorOfValues
> % vectorOfValues = [];
>
> f=figure('name','test',...
> 'numbertitle','off',...
> 'menubar','none',...
> 'color',[0.85, 0.85, 0.85],...
> 'units','normalized',...
> 'position',[0 0.1 0.95 0.87]);
>
> col=get(f,'color');
>
> uicontrol('style','pushbutton',...
> 'units','normalized',...
> 'position',[0.325 0.1 0.10 0.04],...
> 'string','Table',...
> 'backgroundcolor',col,...
> 'callback',@go99709);
>
>
>
>
> ht2=uicontrol('style','text',...
> 'units','normalized',...
> 'position',[0.5, 0.3,0.4 0.5],...
> 'backgroundcolor',[0.95, 0.95, 0.95],...
> 'string','',...
> 'fontsize',15);
>
> hlb576=uicontrol('style','listbox',...
> 'units','normalized',...
> 'position',[0.3 0.3 0.15 0.1],...
> 'string',{'y11';'y22'});
>
> function go99709(varargin)
>
> choice=get(hlb576,'value');
> if choice==1
> y6=[10 20 30 40]
> y66=[1 2 3 4]
> set(ht2,'string',sprintf('%.0f \\circ %.0f min\n',[y6';y66']))
> elseif choice==2
> set(ht2,'string','Car price')
> end
> end
> end
>
> Best Regards
>
> Hans
Anybody that can help me?
I would really appreciate if anybody could come up with a modified edition of the example I have shown above.
Best Regards
Hans
|