How to retrieve data entered in an edit box
조회 수: 4 (최근 30일)
이전 댓글 표시
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
채택된 답변
Azzi Abdelmalek
2013년 3월 11일
편집: Azzi Abdelmalek
2013년 3월 11일
s=str2double(get(handles.editboxname,'string'))
% editboxname is the tag of your edit box.
댓글 수: 9
Azzi Abdelmalek
2013년 3월 11일
편집: Image Analyst
2013년 3월 11일
The code
user_speed=str2double(get(handles.EnterSpeed,'string'));
You should put it in the pushbutton callback, NOT the edit field callback.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!