From style edit field make a Callback by KeyPressFcn. I try to read out the content of entire String. But I get an empty string back, until I press "return". Is there a way to get the String back without pressing return?
****
set(hObject, 'KeyPressFcn', {@edit_input_KeyPressFcn(hObject, eventdata, handles});
****
function edit_input_KeyPressFcn(hObject, eventdata, handles)guidata(hObject, handles);keyinput = eventdata.Key;if strcmpi(keyinput, 'comma') get_txt = get(hObject,'String'); set_txt = strrep(get_txt,',','.'); set(hObject,'String',set_txt);end
Best Answer