App Designer text box vs GUIDE

조회 수: 4 (최근 30일)
Carl Banks
Carl Banks 2019년 1월 30일
댓글: Carl Banks 2019년 1월 31일
If I create a GUI with GUIDE that has text boxes (really uicontrols with the 'edit' style), the behavior of the text box when you click it is that all the text in the box is immediately selected, so that if you start typing you'll replace the value. If you want to place the cursor to edit the existing value, you need to double-click it.
In App Designer text boxes, the situation is reversed: clicking places the cursor and double-clicking selects the whole box. This is pretty much a deal breaker for us. Our analysts need to enter values into maybe 20 text boxes, and having to double click every time pretty much kills the flow. (Keep in mind that these are numbers boxes, which means there is a zero or some other number in the box by default; it would be not as bad if boxes started out empty.)
So, my question is, is there a workaround. We find App Designer superior to GUIDE in just about every other way.
This is R2017a BTW. App Designer is pretty new so maybe they fixed some newbie issues by now.

답변 (1개)

Cris LaPierre
Cris LaPierre 2019년 1월 30일
In 2018b you still have the same behavior. The best work around I can think of is if you tab between edit fields, it selects the current contents in the edit field (numeric). Setting the tab order is not straightforward, but this answer might help.
  댓글 수: 2
Cris LaPierre
Cris LaPierre 2019년 1월 30일
Following up on the other option you mentioned, you could use an edit field (text), which does allow for it to be empty to begin with, and just do a str2double on the value.
function EditFieldValueChanged(app, event)
value = str2double(app.EditField.Value);
end
Carl Banks
Carl Banks 2019년 1월 31일
Typical Mathworks, blustering out great ideas without giving two seconds of thought about usability issues.

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

카테고리

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

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by