GUI Edit TextBox: display 2 values separated by a space
1 次查看(过去 30 天)
显示 更早的评论
I have 2 textbox in my GUI. User needs to enter a range in TextBox_1 (e.g.: 1 5) and second TextBox shows the output with some simple Maths calculation. My current script:
function edit1_Callback(hObject, eventdata, handles)
A = get(handles.edit1,'String');
B = str2num(A{:});
C=2+B;
set(handles.edit2,'String',C);
However, second textbox disappears from GUI when I run this script. May I know which part of the script was written wrongly? Thanks.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specialized Power Systems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!