Invoke callback when focus is lost WITHOUT editing Text Edit box

조회 수: 1 (최근 30일)
thomas mann
thomas mann 2013년 9월 12일
huh.. long title, let me explain the situation:
- there is an text edit box, user inputs some text, clicks away (or presses enter) - callback is invoked, which checks the input if it is OK. since the input is incorrect, an errordialog is showed asking user to correct his input. then
uicontrol(handleoftextedit)
is used inside the callback function to focus back to the text edit box.
- the problem now is: the user is not forced to correct the text edit box input, he can click away without being the callback invoked again after closing the error dialog box. i want the callback to be invoked if the user clicks away from the focused text edit box without correcting the previous incorrect value.

채택된 답변

Jan
Jan 2013년 9월 12일
The callback is triggered only, if the string has been changed. This is not sufficient for your problem. In a similar case I delete the invalid string in the edit field.
  댓글 수: 1
thomas mann
thomas mann 2013년 9월 13일
yes, i can delete the edit filed, but the user is still not forced to edit, is it?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by