Error using uistyle for a table

조회 수: 1 (최근 30일)
vedesh Mohit
vedesh Mohit 2020년 2월 12일
댓글: vedesh Mohit 2020년 2월 12일
Hey I using guide on Matlab 2019b version. I am trying to run the following code but I am only getting the error (Undefined function or variable 'uistyle'). I am looking at the documentation to use uistyle, so why am I gettingthis error?
fig = uifigure;
fig.Position = [500 500 520 200];
uit = uitable(fig);
uit.Data = kdata;
uit.Position = [20 30 480 135];
s = uistyle('BackgroundColor','red');
addStyle(uit,s,'cell',[1,2]);
  댓글 수: 3
Walter Roberson
Walter Roberson 2020년 2월 12일
It works for me in R2019b. Could you re-check whether possibly you are using R2019a? The uistyle() function is new in R2019b.
vedesh Mohit
vedesh Mohit 2020년 2월 12일
Hey, Sorry yes it R2019a

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

채택된 답변

Walter Roberson
Walter Roberson 2020년 2월 12일
uistyle does not exist in r2019a or earlier, so you would need to upgrade to use it.
  댓글 수: 1
vedesh Mohit
vedesh Mohit 2020년 2월 12일
Thanks. I have upgraded and it works.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by