clearing text filed in app when clicking in the text box

조회 수: 5 (최근 30일)
hegel
hegel 2020년 3월 15일
답변: Subhamoy Saha 2020년 3월 16일
hi everyone,
question...
I'm making an app that when initializes it shows sample format of the data that needs, for example YYYY MM DD HH MM SS for time vector, I dont want it to be numeric, so when I click on the box and start typing the letters dont go away and I have to delete them. Is it possible that when the user clicks on the box the letters go away so when finish typing dont have to delete the leters? actually the same with numeric field, I have to have a number to initialize the app, but if I want to change it I want the old number to go away when I type a new number.
Is there a "hint" option that when hover the mouse over the field box it shows text?
thanks in advance!
hg
  댓글 수: 1
Mohammad Sami
Mohammad Sami 2020년 3월 16일
You can use the property "Tooltip" to display the hint instead.

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

채택된 답변

Subhamoy Saha
Subhamoy Saha 2020년 3월 16일
Numeric field needs a default number. It cannot be blank.
As Mohammad Sami told, you can use the tooltip property to display hint.
While entering values into (numeric/text) edit field you can click twice instead of single click. It will select the whole text and when you start typing the old text will be removed.
You an also use tab key to go to the desised field (if that is convenient to you) and in that case also the old values will be preselected and entering new value will replace 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