Info
此问题已关闭。 请重新打开它进行编辑或回答。
Easy question for editbox?
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I am using edit box as an input window. When user click enter button callback of the edit box runs and takes the input. And in order to change the text of edit box I need to select the editbox again. Is there code that I can add and of callback, it selects edit box instead of me.
0 个评论
回答(1 个)
Image Analyst
2013-12-14
You don't need to "select" it. You just use the set() function to send a string to it.
set(handles.edit1, 'String', yourString);
4 个评论
Image Analyst
2013-12-15
What do you mean by "select"? Do you mean to highlight the text that is in there so that if the user types a character the whole contents are replaced by what he typed? Or do you mean that it just has focus? If it's the former you'll have to look to some java code. Try http://undocumentedmatlab.com/blog/customizing-editboxes/ - that will show you how to do it.
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!