GUIDE edit text

2 次查看(过去 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