GUI (static text display question)
이전 댓글 표시
percentage_complete=(1-(mxn-i)/mxn)*100;
if percentage_complete > 0 && percentage_complete < 25
set(handles.sonar_sali ent_percentage,'string','0')
elseif percentage_complete> 25 && percentage_complete < 50
set(handles.sonar_salient_percentage,'string','25')
elseif percentage_complete > 50 && percentage_complete < 75
set(handles.sonar_salient_percentage,'string','50')
elseif percentage_complete > 75 && percentage_complete < 100
set(handles.sonar_salient_percentage, 'string','75')
else
set(handles.sonar_salient_percentage,'string','100')
end
_________
Sorry not familiar with matlab coding.
I am trying to use static text in matlab GUI. i changed the tag to sonar_salient_percentage
and I want the static text to change in the GUI once a condition is met.
Right now the static text is not even updating? any idea what to do.
I am trying to display the percentage of completeness so i know when the code will finish running.
댓글 수: 2
per isakson
2014년 6월 11일
편집: per isakson
2014년 6월 11일
Your code look ok to me. Is the code snippet executed?
BTW: percentage_complete equal to 0, 25, 50, or 75 will display 100
Bryce
2014년 6월 24일
I have a similar question that I am about to ask. My question though is how to make a handle for static text boxes because handles are not automatically created (at least that is my understanding) through GUIDE. Are you sure that the static text box does in fact have the handle: "handles.sonar_salient_percentage"?
When I look at my code, by the static text box it says "empty - handles not created until after all CreateFcns called"
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Desktop에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!