Writing Paragraphs Into a Text File
1 次查看(过去 30 天)
显示 更早的评论
So I'm currently running a GUI and I'd like to have an option for users to be able to push a button and type in some notes, as in a couple of paragraphs, into a box of some sort (sort of like a bigger version of the edit text) and then save the results as a text file with correct formatting in the event that something goes wrong with the script or they'd like to leave a comment. I'm kind of lost on how I would even start this so if anyone could even point me in the right direction I'd really appreciate it.
2 个评论
采纳的回答
Walter Roberson
2017-5-11
TheHandle = uicontrol('Style','edit','Max',2, 'units','norm','position',[0 0 .5 .5]);
Now allow the user to type whatever they want into the space.
user_typing = cellstr( get(TheHandle, 'string') );
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!