Browse option In matlab GUI

HI All, I am very new to Matlab Gui
I am designing GUI,
GUI has Browse Push Button , where User can Type the Path in Gui, Next By Pressing Browse Push button it should root it to exact path given by user, It is similar RUN Dialogue Box In Windows Start.
Can any one Help on this Please?

3 commentaires

Walter Roberson
Walter Roberson le 30 Oct 2013
Please expand on what you mean by "root it".
Is cd() a suitable way to "root" it for your purposes?
Hussain
Hussain le 30 Oct 2013
Root it ,means that "refers to" exact path
Hussain
Hussain le 30 Oct 2013
Let me Explain in detail GUI which has EDIT test box and Browse button (Push button), what ever we type on Edit test box it should be sucessfully executed after pressing Browse Button,
Its similar to RUN Dailoge Box in Windows

Connectez-vous pour commenter.

Réponses (2)

ES
ES le 30 Oct 2013

0 votes

yes.. cd should do. on the Browse button's callback, read the value from the text box.
In the Button's callback
TextPath=get(handles.textbox,'string')
try
cd(TextPath)
catch errorE
dis(errorE.message);
end

2 commentaires

Hussain
Hussain le 30 Oct 2013
Not working , its showing Unidentified Catch
ES
ES le 30 Oct 2013
catch was merely an add on. Just in case if the cd fails or if someone enters some wrong test in the edit box.
just do the
TextPath=get(handles.editbox,'string')
cd(TextPath)

Connectez-vous pour commenter.

Catégories

En savoir plus sur App Building dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by