How to get data from edit text box in GUI with a push button
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Geoff Hayes
le 4 Avr 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 commentaires
Voir également
Catégories
En savoir plus sur Graphics Object Properties dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!