Filter löschen
Filter löschen

How to retrieve data entered in an edit box

4 Ansichten (letzte 30 Tage)
Achchuthan Ganeshanathan
Achchuthan Ganeshanathan am 11 Mär. 2013
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?

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 11 Mär. 2013
Bearbeitet: Azzi Abdelmalek am 11 Mär. 2013
s=str2double(get(handles.editboxname,'string'))
% editboxname is the tag of your edit box.
  9 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 11 Mär. 2013
Bearbeitet: Image Analyst am 11 Mär. 2013
The code
user_speed=str2double(get(handles.EnterSpeed,'string'));
You should put it in the pushbutton callback, NOT the edit field callback.
Achchuthan Ganeshanathan
Achchuthan Ganeshanathan am 11 Mär. 2013
thankyou that has done the trick

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by