How to have the mouse cursor automatically select a text box in App Designer when you open an App?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 8 Nov. 2022
Bearbeitet: MathWorks Support Team
am 8 Nov. 2022
Many apps or websites will have the cursor already be inside a text box so it is not necessary to click on it to begin typing. Is this feature possible in Matlab App Designer? If so, how is it done?
The feature already is available in Guide, as seen here:
Akzeptierte Antwort
MathWorks Support Team
am 8 Nov. 2022
Bearbeitet: MathWorks Support Team
am 8 Nov. 2022
In R2022a and later releases, you can use focus function.
For example, you can add the following line to the app's StartUpFcn in App Designer:
focus(app.EditField) % or whatever the EditField handle is
In R2021b and earlier releases, there is no way to have the cursor automatically select the text box in App Designer. However, you can focus on an object in the GUI by pressing the Tab key.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!