Change Background Color of uitable in App Designer given different conditions?

조회 수: 8 (최근 30일)
Ash Lord
Ash Lord 2020년 12월 10일
댓글: Ash Lord 2020년 12월 18일
Hi everyone!
I'm using the app designer and trying to figure out how to change the cell color of my table given different conditions. Say, if uit.data is between 0-5 make the cells blue, if 5-10 make them yellow and 10-15 make them green. I need to do this without using uistyle for compatibility reasons.
Thanks in advance!

답변 (1개)

Mario Malic
Mario Malic 2020년 12월 10일
You could try splitting the code for different versions.
matlabVerTemp = ver('matlab');
matlabVersion = matlabVerTemp.Version;
if matlabVersion > 9
% code
else
% code
end
  댓글 수: 5
Mario Malic
Mario Malic 2020년 12월 17일
If my answer helped you, please accept it, thanks in advance.
Ash Lord
Ash Lord 2020년 12월 18일
Hmm. It helped but I am still hoping to get info on what code I can use in place of the uistyle that would change the background colors of the cells in my table. I don't want to close the thread just yet.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by