display "value" on edit text matlab

19,215

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)
Share:
19,215
Tim
Author by

Tim

Updated on November 19, 2022

Comments

  • Tim
    Tim 12 months

    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

    • yuk
      yuk over 13 years
      @Tim: A small advice: You opened 7 questions, but yet didn't accept answer for any of them. Please do, this will increase your chance to get more answers for other questions.