Hi,
I am building a GUI with an EditText box and I want to pull the String out of it in my program, essentially as follows:
s = get(handles.edittext, 'String');
However, I want to get whatever the user currently has typed in there, which appears only to update after the user hits enter, etc.
I have tried updating the edittext box programmatically by calling its callback, but it still does not give the currently typed String (it gives the prior-updated string). Example:
edittext_Callback(handles.edittext, [], handles);
I have also tried updating the focus using the 'uicontrol' function. Example:
uicontrol(handles.edittext);
But again, it only gives the string that was in the box when the user caused it to update.
I am at a loss. Is there any way to snag what the user currently has typed in the EditText without the user having to cause it to update manually?
Best Answer