From: Javier Cancio on 20 Jul 2010 15:47 Hi everybody, I'm trying to write some information in static text object. This information will be updated every certain time. Currently i'm trying this way: set(handles.text_info, 'String', ['Volume Size: ',num2str(size(volOriginal))]); set(handles.text_info, 'String', [get(handles.text_info, 'String'), '\nSomething else']); But i can not get the new line to be shown. I see the '\n' instead. Thanks!
From: someone on 20 Jul 2010 15:57 "Javier Cancio" <sepholin(a)gmail.com> wrote in message <i24ufr$c2h$1(a)fred.mathworks.com>... > Hi everybody, > > I'm trying to write some information in static text object. This information will be updated every certain time. Currently i'm trying this way: > > set(handles.text_info, 'String', ['Volume Size: ',num2str(size(volOriginal))]); > set(handles.text_info, 'String', [get(handles.text_info, 'String'), '\nSomething else']); > > But i can not get the new line to be shown. I see the '\n' instead. > > > Thanks! % Perhaps something like: set(handles.text_info, 'String', ['Volume Size: ',num2str(size(volOriginal))]); set(handles.text_info, 'String', {get(handles.text_info, 'String');'Something else'});
From: us on 20 Jul 2010 15:58 "Javier Cancio" <sepholin(a)gmail.com> wrote in message <i24ufr$c2h$1(a)fred.mathworks.com>... > Hi everybody, > > I'm trying to write some information in static text object. This information will be updated every certain time. Currently i'm trying this way: > > set(handles.text_info, 'String', ['Volume Size: ',num2str(size(volOriginal))]); > set(handles.text_info, 'String', [get(handles.text_info, 'String'), '\nSomething else']); > > But i can not get the new line to be shown. I see the '\n' instead. > > > Thanks! one of the solutions uh=uicontrol('position',[10,10,100,100],'style','text'); set(uh,'string',{'alpha';'beta';'CSSM'}); us
From: Walter Roberson on 20 Jul 2010 15:57 Javier Cancio wrote: > I'm trying to write some information in static text object. This > information will be updated every certain time. Currently i'm trying > this way: > > set(handles.text_info, 'String', ['Volume Size: > ',num2str(size(volOriginal))]); > set(handles.text_info, 'String', [get(handles.text_info, 'String'), > '\nSomething else']); > > But i can not get the new line to be shown. I see the '\n' instead. Use cell arrays instead. set(handles.text_info, 'String', { ['Volume Size: ', ... num2str(size(volOriginal)) ] }); set(handles.text_info, 'String', [get(handles.text_info, 'String'), {'Something else'});
From: Javier Cancio on 20 Jul 2010 17:30 Thanks all for helping :)
|
Pages: 1 Prev: Question about dicom read Next: Question about dicom read |