App Designer text box vs GUIDE
조회 수: 4 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
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
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!