How to create an inputdlg with a portion of the default text already selected?
2 次查看(过去 30 天)
显示 更早的评论
I'd like to create an input dialog box where a subset of the default text is already selected so that the user will overwrite it by beginning to type. Has anyone managed to make something like this work without creating your own gui in GUIDE or AppBuilder?
0 个评论
回答(1 个)
Mischa Kim
2016-9-7
编辑:Mischa Kim
2016-9-7
David, do you mean something like
prompt = {'Enter matrix size:','Enter colormap name:'};
dlg_title = 'Input';
num_lines = 1;
defaultans = {'20',''};
answer = inputdlg(prompt,dlg_title,num_lines,defaultans);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!