フィルターのクリア

How to retrieve data entered in an edit box

4 ビュー (過去 30 日間)
Achchuthan Ganeshanathan
Achchuthan Ganeshanathan 2013 年 3 月 11 日
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?

採用された回答

Azzi Abdelmalek
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
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.
Achchuthan Ganeshanathan
Achchuthan Ganeshanathan 2013 年 3 月 11 日
thankyou that has done the trick

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by