Issue with capturing "tab" key using the available KeyPressFcn callbacks in AppDesigner

11 visualizzazioni (ultimi 30 giorni)
I'm working on a GUI using App Designer, and I'm facing difficulties capturing the "tab" key within an editable DropDown list to enable text autocompletion based on user input. Despite multiple attempts, I haven't been successful in achieving the desired functionality. I'm reaching out to the community to seek assistance or solutions for this particular challenge. Here's some additional context:
Background:
  • UIFigure components like DropDown lists currently lack a built-in "KeyPressFcn" property to capture key events while focused.
  • Existing callbacks like "UIFigureWindowKeyPress" don't trigger the “tab” key when the focus is within the DropDown list and the Dropdown list is open, limiting interaction options.
Observations:
  • Attempts to define "KeyPressFcn" programmatically in App Designer code throw errors like "Unrecognized property 'KeyPressFcn' for class 'matlab.ui.control.DropDown.'"
  • Implementing a generic "UIFigureKeyPress" callback doesn't address the root cause as the focus remains within the DropDown list, preventing key capture.
Expected Behavior:
  • In order to illustrate the situation, I added an example of this functionality using MS Excel. As shown in the attached GIF, ideally, users should be able to capture key presses even when focusing on UIFigure components like DropDown lists. This allows for richer application interactions and user experiences.
If anyone has encountered and resolved a similar issue, I would greatly appreciate it if you could share your solution. Alternatively, I'd like to propose the following approach:
  • I propose the addition of a "KeyPressFcn" property to DropDown lists and other relevant UIFigure components.
  • Alternatively, implementing the ability to add custom callbacks to any component would offer greater flexibility for capturing user interaction beyond existing predefined callbacks.
Thank you in advance,
Juan
  3 Commenti
Tiffany
Tiffany il 5 Apr 2024
Hi Juan,
I would like to apologize for the inconvienece you face when attempting to add this functionality into the "tab" key. I've made our development team aware of your proposed enhancements, so they can consider implementing these features in future releases.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Maintain or Transition figure-Based Apps in Help Center e File Exchange

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by