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!