Creating a terminal similar to Matlab terminal in a GUI

4 views (last 30 days)
Hi,
I want to create a terminal window much like the Matlab command window which will periodically display messages and I am able to scroll through them freely.
Right now I've kind of accomplished that by using listbox.
function main()
this.gui_h = guidata(messages);
for i = 1:500
pause(0.5);
outputString = sprintf('I am %d years old', i);
oldmsgs = cellstr(get(this.gui_h.window_disp,'String'));
set(this.gui_h.window_disp, 'String',[oldmsgs; {outputString}] );
end
end
One slight problem is that since the string always updates it stuffs up the scrollbar and is not very userfriendly. I have trouble freely scrolling through past messages as it constantly updates to the latest messages.
Any fix? I've attached my gui figure file...

Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!