how to restore the original content of an edit control

  • When I start editing a value in an edit control and change my mind, is there a way to restore the original content? Neither Esc nor Ctrl+Z seems to work.
  • When I submit the edited value to a callback and the callback figures out that the content is invalid, is there a way to restore the original valid content (other than fiddling with UserData)?

 채택된 답변

Walter Roberson
Walter Roberson 2013년 12월 12일

0 개 추천

No, the Uicontrol have no "memory". If you want to restore the content, you need to save the content before the potential modification, and then set() it back into place.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

제품

질문:

2013년 12월 12일

답변:

2013년 12월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by