Using inputdlg without freezing other figures
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I'm trying to write a code that requires the user to go through some frames of a video file and gather information from the frames, and then to input that information in a dialog box.
Here is my code currently:
implay(fullfile(src_path,'Vids',strcat('Edge_',filename,format)));
prompt = {'Enter y-component of SUBSTRATE position:',...
'Enter y-component of TIP position:'}; %Dialog box prompts
dlg_title = 'Tip/Substrate Position';
def = {'Use interactive video player and image toolbox to find value',...
'Use interactive video player and image toolbox to find value'};
num_lines = 1;
answer2 = inputdlg(prompt,dlg_title,num_lines,def);
sub_pos = str2num(answer2{1,1});
tip_pos = str2num(answer2{2,1});
The problem with the current code is that once the dialog box opens, the video player is frozen...the only figure I can interact with is the dialog box.
I want to find a way to make it so that both the video player and the dialog box are accessible at the same time. After the user enters the information into the dialog box and clicks "OK", I then want the program to resume through the rest of the code (not shown).
0 Commenti
Risposte (1)
Walter Roberson
il 20 Ago 2013
Try passing 'WindowStyle', 'normal' as additional options to inputdlg()
My suspicion is that in the end you are going to need to construct your own input dialog that creates the dialog you want, and then your routine uses waitfor() the OK to be pressed and then fetches the stored answer from the figure you created to hold the dialog.
0 Commenti
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!