How to incorporate a picture into an inputdlg?
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Ankit
el 17 de Sept. de 2019
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
el 17 de Sept. de 2019
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
Respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!