Filter löschen
Filter löschen

How to incorporate a picture into an inputdlg?

11 Ansichten (letzte 30 Tage)
beginner94
beginner94 am 13 Sep. 2019
Kommentiert: Adam am 17 Sep. 2019
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 Kommentare
Ankit
Ankit am 17 Sep. 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
Adam am 17 Sep. 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by