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

1 view (last 30 days)
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

Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!