Error using uistyle for a table
3 次查看(过去 30 天)
显示 更早的评论
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
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.
采纳的回答
Walter Roberson
2020-2-12
uistyle does not exist in r2019a or earlier, so you would need to upgrade to use it.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!