In GUI how to take input from keyboard?

10 次查看(过去 30 天)
I'm writing a code for an application where i'll have to take input from keyboard. I've designed a GUI.
How to pass the parameter taken from keyboard to my prtogram?

回答(2 个)

ES
ES 2013-10-18
this is GUI's DE(development Environment). Run the GUI by clicking on the Green Play button at the menu. The GUI will execute. there you can type the values into the Text Fields. If you want to pass the Text data to a logic(m script) write callbacks.

Image Analyst
Image Analyst 2013-10-18
Get the string in the edit box from any function that has access to the handles structure. This will include all GUIDE-generated callback functions and any of your own functions that you pass the handles structure into as an input argument. Then:
editBoxContents = get(handles.editBox1, 'String');

类别

Help CenterFile Exchange 中查找有关 Desktop 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by