Re: Display mutiple lines strings in matlab edit box issue



On Feb 13, 11:15 am, "Matt Fig" <spama...@xxxxxxxxx> wrote:
Why not put the new string on top of the old strings?  That way you can always view the latest addition.

Just make sure the editbox is tall enough to show however many lines is printed each time the log records.  This example adds one line:

%-------------------------------------------------------------------------- --------------%
figure('pos',[500 500 200 50],'menub','no')
ed = uicontrol('sty','ed','mi',0,'ma',2,'pos',[10 10 180 30],'fonts',14,...
               'str',{'one';'two';'three';'four'});        
uiwait(msgbox('Click to add string','Add String')); % Simulate a callback trigger.
addedstr = {'New'}; % Add this string to the edit box.
set(ed,'str',cat(1,addedstr,get(ed,'str')));
%-------------------------------------------------------------------------- --------------%

dK8<E@8B$<VVF:9<VKGKFVPDD<@]F:8?EFpMVvF8VV{>888F?C9LV?0]LGC

;o), thanks for your example.
In fact, I have done like your suggest, display new string on top of
the old strings.
but our team think, we should keep same log print style with all of
our products.
because other product, using our product on linux command window, we
display log on the bottom of the window. So do matlab command window.
So this issue was reopened.
anyway, any ideas?

John Cui

thanks very much!








.



Relevant Pages

  • Re: Error 1308 comparing strings
    ... But the following code fails in the command window: ... "Dan Freeman" wrote: ... >> memo field into a string and comparing the two strings. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Error 1308 comparing strings
    ... Works fine for me in VFP9 in the command window. ... >>> a string and a memo field with lengths of 169,378 chars and 338,852 ... >>> memo field into a string and comparing the two strings. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: DOS command window handler
    ... If you want to open a command window, and send multiple commands to it you ... STRING lpClassName,; ... DECLARE INTEGER ShellExecute; ... *- I'm using FindWindow API to tertieve the HWND of the cmd-window ...
    (microsoft.public.fox.programmer.exchange)
  • RE: Shelled application with Win2003
    ... Optional AppTitle As String, _ ... ' AppTitle - title of command window. ... ' HideWindow - hide command window? ... Dim EnvString As String ...
    (microsoft.public.vb.general.discussion)