Tim
Tim

Reputation: 61

display "value" on edit text matlab

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

Upvotes: 1

Views: 19300

Answers (1)

Jonas
Jonas

Reputation: 74940

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)

Upvotes: 8

Related Questions