edit box keypressfcn on every keypress
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
Got a pretty basic question, but just can't figure out how to solve my problem.
I'm desigining a simple GUI, with an edit text box and a list box. I want the list box to update its contents every time a character is entered into the edit box.
The problem is that the edit box's keypressfcn only executes once when a key is pressed, and won't execute again until the edit box loses focus, regains it and another character is entered. In other words, when entering two characters consecutively, the keypressfcn is run when the first character is entered, but not when the second character is input.
The only contents of the edit box's keypressfcn is a call to 'set' to change the list's 'String' property.
How do I get the keypress function to run every time a character is entered, without losing focus on the edit box so the user can keep typing?
Thanks, B
0 Commenti
Risposte (1)
Daniel Shub
il 9 Apr 2012
You could create a static text box and use the figure keypressfcn to update the info in the static text box.
0 Commenti
Vedere anche
Categorie
Scopri di più su Dialog Boxes in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!