How to retrieve data entered in an edit box
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have an edit box in my GUI. User inputs a number into the editbox and then pushes a pushbutton. when the pushbutton is pressed an external function is called. for the external function i need the number entered in the editbox. How can i used 'handles' to retrieve the data input in the edit box?
0 Commenti
Risposta accettata
Azzi Abdelmalek
il 11 Mar 2013
Modificato: Azzi Abdelmalek
il 11 Mar 2013
s=str2double(get(handles.editboxname,'string'))
% editboxname is the tag of your edit box.
9 Commenti
Azzi Abdelmalek
il 11 Mar 2013
Modificato: Image Analyst
il 11 Mar 2013
The code
user_speed=str2double(get(handles.EnterSpeed,'string'));
You should put it in the pushbutton callback, NOT the edit field callback.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps 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!