select folder in GUI matlab and uigetdir

조회 수: 9 (최근 30일)
as hz
as hz 2012년 10월 4일
댓글: Image Analyst 2016년 3월 22일
Hi,
How can I use the uigedir function in matlab GUI, using a Push Button and to show the selected folder in a Edit text. An example will be great help.
Thanks.

채택된 답변

Image Analyst
Image Analyst 2012년 10월 4일
folder = uigetdir();
textLabel = sprintf('Your folder is %s', folder);
set(handleToYourTextLabel, 'String', textLabel);
  댓글 수: 2
Arif ul Maula
Arif ul Maula 2016년 3월 22일
Can you please tell me that when we deploy matlab gui using deploytool, then .exe we get is not able to add directory other than the one where we find our distributable files, why??
How can I add image directories anywhere on my system? please help!!
Image Analyst
Image Analyst 2016년 3월 22일
That's why I don't use deploytool.
I've even let them know I won't use deploytool until they let me create folders, during installation, at any location I want, such as under c:\users\public\document or wherever. Currently you can only create subfolders of your installation folder and nowhere else. I use a third party installer, Wise. It's now defunct but I still keep using it because it has a nice two-panel drag and drop capability (drag from your computer onto the target computer) that other installers like InstallShield don't have. I haven't found any modern installer that I like yet.
A workaround is to have a function when you start your app to look for the folder you want, and if it's not there, create it with mkdir() and copy/move any files you want from the app's folder to that folder that you just made.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by