tags:

views:

161

answers:

1

Hello I'm creating a GUI and I want the "Edit text" button to display the name of the file I selected....i've stored the filename and the pathname in a variable called "File_Selected:....but how do i pass the filename only to the EditText function on my GUI

+1  A: 

Find the tag of the button (or text field) by double-clicking on the button in GUIDE and looking at the Tag-propert. Assume the tag is called edit2.

Then, inside a callback (which has three input arguments, hObject, eventdata, and handles), you write

set(handles.edit2,'String',File_Selected)
Jonas