How to get data from edit text box in GUI with a push button
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I am building a GUI with an edit text box and a puch button, and I want to save the data (which is written by the user) from the edit box to a variable when the button is pushed. So I was using this code, but I got the error of:
Attempt to reference field of non-structure array.
Error in untitled>button_send_Callback (line 105) data = get(handles.datatosend, 'String');
The code: global data; data = get(handles.datatosend, 'String');
I have no idea what can be the problem. Thank you for helping.
4 Commenti
Risposte (1)
Geoff Hayes
il 4 Apr 2017
GUIDE-created GUIs can be launched from the GUI editor, the m-file editor, or from the command line by invoking the name of the GUI. Opening the figure (the *.fig) file just opens the figure and it does not perform any of the initializations that are necessary/needed for using the GUI.
0 Commenti
Vedere anche
Categorie
Scopri di più su Graphics Object Properties in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!