Using inputdlg without freezing other figures
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Walter Roberson
le 20 Août 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 commentaires
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!