GUI's: execute function on each keystroke done in a edit textbox

1 Ansicht (letzte 30 Tage)
Ignacio
Ignacio am 16 Jan. 2014
Hi there! I'm new to matlab and its guis, and i'm trying a very simple thing. I have an edit textbox (edit_symbols) and next to it a text tag (text7).
I just want to display on text7 the number of characters on the edit_symbols box; so i'm trying something like:
function edit_symbols_Callback(hObject, eventdata, handles) var = get(hObject,'String'); set(handles.text7,'String',length(var));
My issue: text7 ONLY shows the number of chars on the edit text box ONLY when the focus on the edit text box has been lost (click on ENTER or TAB or mouse click elsewhere). How can i change the content of text7 each time the user press a Key??
Thank you very much in advance

Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks 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!

Translated by