MATLAB: Background of editable cells UITABLE

backgroundMATLABuitable

Hi !
I created an uitable with guide and I would like to change the background of editable cells.
I tried to use the HTML code with the method https://www.mathworks.com/matlabcentral/answers/25038-how-to-change-each-cell-color-in-a-uitable , it works for the background, but I can't change the value of my cell anymore.
Any ideas ?

Best Answer

[Continued from comments section under the question]
Summary of the problem
"when the [callback function] is over, the first line is executes once again. I don't understand why."
This is an unfortunate, known problem in GUIDE GUIs. The 2nd invocation of the callback function is the result of changing the object focus which is inevitable.
Solution
To get around this, at the top of your callback function write a conditional that escapes the callback function if the indices are empty.
if isempty(eventdata.Indices)
return
end