problem with a gui of directories

조회 수: 2 (최근 30일)
Jules Ray
Jules Ray 2011년 11월 3일
편집: Jules Ray 2019년 5월 27일
Hi colleages, i`m preparing a gui for directories selection and other things. This is my proyect:
% Inputs section
clear
close all
stationsdir= uigetdir('/Users/mac/Documents/MATLAB/','Station Folder');
resultdir=uigetdir('/Users/mac/Documents/MATLAB/','Station Folder');
pathtool
station='test4';
the gui works, but really bad beacuse all navigation windows start to open at the same time...
i would like to include al navigation windows in just one main window with buttons to select the directories... or something like this... and also a small box to define the station name (station='test4')
uff... is a lot of work but every comment will be appreciated..
  댓글 수: 2
Image Analyst
Image Analyst 2011년 11월 3일
Not sure what your problem is, but when I run the code, each dialog box comes up one at a time, after I closed the prior one. They don't all "open at the same time."
Jules Ray
Jules Ray 2011년 11월 4일
i got this pop ups:
what i need is to join all this popups in just one window or gui... that's my problem
clear
close all
waitfor(msgbox('The next windows will guide you through the amazing world of neotectonics. So i can tell you that this creation has been for moments a real pain in the ass.. ).... enjoy', 'ABOUT THIS SCRIPT'))
msgbox('Please indicate the Results Directory (this is the folder which contains the results files, must be in a different directory than Staionsdir) ', 'RESULTS DIRECTORY' );
pause(5)
resultdir1=uigetdir('/Users/mac/Documents/MATLAB/terracem');
waitfor(msgbox('Please indicate the Station Directory (must coincide with the proyect folder)', 'STATION DIRECTORY'));
pause(5)
stationsdir1=uigetdir('/Users/mac/Documents/MATLAB/terracem');
disp('Station dir path defined')
pause (5)
prompt = {'Enter proyect name'};
dlg_title = 'Input for Swath profiling';
num_lines = 1;
def = {'20','hsv'};
station1=inputdlg(prompt,'Enter the Station Name');
waitfor(msgbox('Path to where TMA script is paced (normaly equal than Stationsdir)', 'TMA Directory'))
pathtool
stationsdir=char(stationsdir1);
resultdir=char(resultdir1);
station=char(station1);
clear de dlg_title num_lines prompt resultdir1 stationB stationsdir1

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2011년 11월 4일
Well that's different. msgbox just blasts through not waiting, unlike uigetdir and other such functions. That's why I've defined msgboxw() in an m-file in my utilities directory that is on my path:
function msgboxw(string)
uiwait(msgbox(string));
Then I just call msgboxw() all the time instead of mgsbox().
  댓글 수: 1
Jules Ray
Jules Ray 2011년 11월 4일
thanks image analyst
ok that's working, but what's about to putt all the msgbox and uigetdir into a single layout...
i dont know how guis works or wjat the can do, so my question is. ¿is posible to take many diferents gui's (like my msgbox and uigetdir) and put all into a main gui window?
is posible to do that? what should i use to do that?
thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by