Update slider value after enter a value in editbox.

조회 수: 3 (최근 30일)
Armindo
Armindo 2016년 1월 21일
댓글: Armindo 2016년 1월 26일
I have a slider that I can use to increment an editbox. However I also need to be able to enter a value in the editbox. If I enter a value in editbox and them I cick on the slider it not work properly (if before I don’t press enter). I try to update the value of the slider on the editbox callback by doing something like:
set(hslider, 'value', val);
But this don’t work properly which I believe is related with the need to add an enter after add the value to a editbox.

답변 (1개)

Walter Roberson
Walter Roberson 2016년 1월 22일
편집: Walter Roberson 2016년 1월 22일
Correct. The Callback of the Edit box is not invoked until an enter is received.
  댓글 수: 6
Walter Roberson
Walter Roberson 2016년 1월 22일
The problem with using the KeyPressFcn is that you do not know whether the user is finished typing unless you see the user type a particular character such as return.
Armindo
Armindo 2016년 1월 26일
Yes indeed. That is a big issue. Thank you for all the help.

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

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by