App Designer text box vs GUIDE

4 visualizzazioni (ultimi 30 giorni)
Carl Banks
Carl Banks il 30 Gen 2019
Commentato: Carl Banks il 31 Gen 2019
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.

Risposte (1)

Cris LaPierre
Cris LaPierre il 30 Gen 2019
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 Commenti
Cris LaPierre
Cris LaPierre il 30 Gen 2019
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 il 31 Gen 2019
Typical Mathworks, blustering out great ideas without giving two seconds of thought about usability issues.

Accedi per commentare.

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Prodotti


Release

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by