Hello, I'm looking to have a static text or edit text box change it's value depending on what I put in for the other edit text boxes in a GUI
이전 댓글 표시
Hello, I don't want to have to press a button to get the value in a static or edit text box to change. I want the value to change as I change other values (like excel) with out a push-button in my GUI. I got it to work for a brief moment by placing the code under the function
SIMPLE_FO_GUI_OpeningFcn(hObject, eventdata, handles, varargin)
while(1)
pause(1)
F_SW_in_i_max = str2double(get(handles.F_SW_in_max,'string'));
DSin_i_max = str2double(get(handles.DSin_i_max,'string'));
SWin_i_max = str2double(get(handles.SWin_i_max,'string'));
Water_recov = str2double(get(handles.Percent_water_recov,'string'));
min_draw = # (some value);
set(handles.Min_Draw_flow, 'string', num2str(min_draw)); end
댓글 수: 2
Walter Roberson
2013년 8월 28일
What mechanism are you using to change the variables? Are they being changed in a gui? Do you need the change to take effect every time some variable is modified in the code, without the code needing to have to specifically give notification to look for a new value?
Alex
2013년 8월 29일
채택된 답변
추가 답변 (1개)
ES
2013년 8월 29일
0 개 추천
You can do a Get the value from the first Text Box every time it is edited by using edit Call Back function using
RecievedString=get(handles.Box1, 'String')
Update your Text Box 2 immediately. set(handles.Box2, 'String', RecievedString)
댓글 수: 1
Image Analyst
2013년 8월 29일
I think the values are being changed by the user in Excel, not being changed in MATLAB.
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!