GUIDE edit text

조회 수: 3 (최근 30일)
Leor Greenberger
Leor Greenberger 2011년 9월 27일
I am using an edit text control in guide with a preset string defined. When I run the figure, clicking inside the edit box does not clear the preset string - I must manually backspace over it. Is there a property associated with an edit text control that would automatically erase any text in the control or do I have to use a callback? If the latter, which callback function do I use? Thanks.

채택된 답변

Jan
Jan 2011년 9월 27일
You need to access the underlying Java callbacks. But they are undocumented and can be change in a future Matlab release: See Undocumented: uicontrol-callbacks
I assume, it is the FocusGainedCallback.
  댓글 수: 1
Leor Greenberger
Leor Greenberger 2011년 9월 27일
Thanks Jan. Seems silly to me this wouldn't be documented, though. I would have imagined this would be a common thing to do: set initial/default values in the edit text control and them to be easily changed (without having to manually backspacing over 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