PDA

View Full Version : Uimenu to get a file directory


sauwen
09-09-2008, 02:09 AM
Hello!

I've been having trouble with this for quite a while.. Hopefully some o
you will be able to help me. :)

I'm trying to make a gui with a menubar that has the option to get
directory from a file on the computer and then input that into a textbox.
Here's the bulk problem so far:

set(handles.fig,'MenuBar','none');
menu = uimenu(handles.fig ,'Label','File');
submenu1 = uimenu(menu,'Label','Open','CallBack',@open)

function open(gcf,event_data,handles)
dirr=uigetdir('C:\');
return
end

I don't understand how to return dirr back to the main function and int
the textbox. I also tried set(handles.dataset,'String',dirr); in th
function open() where the handles.dataset is the textbox.

Any help is appreciated! Thanks.

Jack Klein
09-09-2008, 02:38 AM
On Mon, 08 Sep 2008 20:09:14 -0500, "sauwen" <[email protected]>
wrote in comp.dsp:

> Hello!
>
> I've been having trouble with this for quite a while.. Hopefully some of
> you will be able to help me. :)
>
> I'm trying to make a gui with a menubar that has the option to get a
> directory from a file on the computer and then input that into a textbox.
> Here's the bulk problem so far:
>
> set(handles.fig,'MenuBar','none');
> menu = uimenu(handles.fig ,'Label','File');
> submenu1 = uimenu(menu,'Label','Open','CallBack',@open)
>
> function open(gcf,event_data,handles)
> dirr=uigetdir('C:\');
> return
> end
>
> I don't understand how to return dirr back to the main function and into
> the textbox. I also tried set(handles.dataset,'String',dirr); in the
> function open() where the handles.dataset is the textbox.
>
> Any help is appreciated! Thanks.

Do you think anybody is going to know what you are talking about?

What DSP are you using? What operating system (if any)? What tool
set? What third-party libraries?

What the heck are "uimenu" and "uigetdir"?

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html

Mikolaj
09-09-2008, 08:17 AM
NTG

comp.soft-sys.matlab


--
Mikolaj

Mikolaj
09-09-2008, 08:18 AM
NTG

comp.soft-sys.matlab

--
Mikolaj

sauwen
09-10-2008, 01:40 AM
Damn, wrong directory. Shouldve been in the MATLAB DSP. But yeah, I'll tr
it there.