How to incorporate a picture into an inputdlg?

11 次查看(过去 30 天)
Good morning,
did anyone already manage to incorporate a picture into an inputdlg or something similar?
The inputdlg is asking for dimensions and a picture could help to clarify which dimensions exactly are needed.
Thanks!
  2 个评论
Ankit
Ankit 2019-9-17
Whats your Use Case?
Alternatively, you can programmatically create a dialog box using figure, display picture and get input from user etc. and below you can find one such example.
f = figure('Units','Normalized',...
'Position',[.4 .4 .3 .3],...
'NumberTitle','off',...
'Name','Info');
e = uicontrol('Style','Edit',...
'Units','Normalized',...
'Position',[.1 .4 .3 .1],...
'Tag','myedit');
p = uicontrol('Style','PushButton',...
'Units','Normalized',...
'Position',[.6 .4 .3 .1],...
'String','Done',...
'CallBack','uiresume(gcbf)');
i = axes(f,'Units','Normalized',...
'Position',[.2 .2 .1 .1]);
uiwait(f)
out = str2num(get(e,'String'));
you can display image on axes using imshow
Best Regards
Ankit
Adam
Adam 2019-9-17
inputdlg is just a simple what you see is what you get dialog box with no options to add to it. You'd need to create your own for that, as in the reply above

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by