Multi time inputs from a single edittext

The thing is that I want to enter some value in an edittext. When I entered the value, edittext should be cleared itself automaticalyy and it should prepare for another input automatically.
nod = 'How many nodes?'
set(handles.text1,'string',nod)
num_nod = get(handles.edit1,'string')
num_nod = str2num(num_nod);
Up till that everything is well and good. But now to clear the edit text, I used:
set(handles.edit1,'String','');
It clears the edittext. But the problem starts now. Now I want to get another value through edittext. That's why I use:
var = get(handles.edit1,'string')
Before I entered any value, an empty string stored in var displayed as:
var =
''
I want to resolve this problem.
Please help me how can I do it?

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Function Creation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by