필터 지우기
필터 지우기

Creating a terminal similar to Matlab terminal in a GUI

조회 수: 1 (최근 30일)
Izuru
Izuru 2015년 4월 19일
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...

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by