The Data property of a uicontrol can be one of:
- [] the empty numeric array
- a numeric array
- a logical array
- a cell array
The empty numeric array [] is the default property.
In the case of the empty numeric array or a numeric array or a logical array, assigning a character vector to data(1,1) would be an attempt to store about 92 characters into a single location, which is not going to fit.
If the Data property were a cell array, then attempting to store to data(1,1) would get you the error
Conversion to cell from char is not possible.
You should be doing:
data = get(handles.board, 'Data');
if ~iscell(data)
data = num2cell(data);
end
data{1,1} = '{''<html><table border=0 width=400 bgcolor=#FF0000><TR><TD>Hello</TD></TR> </table></html>'' }';
Best Answer