Error using uistyle for a table

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 comentarios

Bhaskar R
Bhaskar R el 12 de Feb. de 2020
That means there is no variable defined or function addStyle in your program
Walter Roberson
Walter Roberson el 12 de Feb. de 2020
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 el 12 de Feb. de 2020
Hey, Sorry yes it R2019a

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Feb. de 2020

0 votos

uistyle does not exist in r2019a or earlier, so you would need to upgrade to use it.

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.

Preguntada:

el 12 de Feb. de 2020

Comentada:

el 12 de Feb. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by