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

2 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Vidip
Vidip il 27 Dic 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:

Categorie

Scopri di più su 使用 App 设计工具开发 App in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!