Creating a terminal similar to Matlab terminal in a GUI
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!