Bad property value found
Show older comments
I am using GUIDE (GUI) and I am getting this error:
Error using set
Bad property value found.
Object Name: uicontrol
Property Name: 'BackgroundColor'.
The line that is giving me the error is:
set(handles.text410, 'BackgroundColor', b{4,
10});
b is a cell of colors and b{4, 10} = 'Orange'
I have a bunch of text boxes, and I don't know why it is giving me this error. I have 45 previous set statements with the same format that all work perfectly. Also, I am positive I have the correct tag.
Thanks so much in advance!
2 Comments
Mike Garrity
on 25 Apr 2016
MATLAB Graphics knows a fairly limited number of colors by name. Orange isn't one of them. You can get other colors by using numeric RGB values.
The list of colornames recognized by MATLAB:
I don't see "orange" on that list.
Accepted Answer
More Answers (0)
Categories
Find more on Just for fun in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!