How to change the cell color of UITABLE in MATLAB2017B by using APPDesign?

2 views (last 30 days)
Firstly, I can change the cell color of UITable by using GUI, just like https://cn.mathworks.com/matlabcentral/answers/179223-how-to-change-the-cell-color-of-uitable-in-matlab. But,it can’t solved by using APPDesign.

Answers (1)

Vidip
Vidip on 27 Dec 2023
I understand that you are able to change the cell colour of ‘uitable’ using the workaround given in the given link, but you want to do the same by using APPDesign.
Starting in R2019b, you can style rows, columns, or cells of a table UI component using the ‘uistyle’ and ‘addStyle’ functions. Styles are only supported when the table UI component is in a figure created with the ‘uifigure’ function. App Designer uses this type of figure for creating apps. ‘uistyle’ specifies Style property values using one or more name-value pair arguments. For example, 'BackgroundColor', 'g' sets the background colour to green. Also, in the R2017b release, it shows that editfield have a property named background colour, so you can use this method to change the cell colour too.
For further information, refer to the documentation links below:

Categories

Find more on 使用 App 设计工具开发 App in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!