"Enter" key function to assign variable in GUI

조회 수: 7 (최근 30일)
Emre Can Ertekin
Emre Can Ertekin 2018년 10월 19일
댓글: Kevin Chng 2018년 10월 19일
I have a problem in adding enter key to my GUI, while taking variable from the user. How can i write a function for enter key?
  댓글 수: 3
Emre Can Ertekin
Emre Can Ertekin 2018년 10월 19일
For example in my gui i have a amplitude of the signal in edittext box, i want the when user enter the value of amplitude end press 'Enter button in keyboard' gui should assign the valur and change the axes.
Kevin Chng
Kevin Chng 2018년 10월 19일
App designer?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 10월 19일
Use the Callback property of the uicontrol. It will be run when the user presses return after selecting the control, or if the user makes a change to the content of the edit field and then clicks somewhere outside the control.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by