uisetcolor figure goes blank

4 次查看(过去 30 天)
Tek
Tek 2023-10-11
回答: Gayathri 2024-9-25
I have a veirg bug considering the uisetcolor function. I am using this function in a callback of my appdesigner app and for the first time uisetcolor is called it works fine. But after the first call, whenever the uisetcolor function is called it creates a blank figure with a title "Color" and nothing else. Weird thing, if I call the uisetcolor repeatedly (around 4 5 times changes everytime) it works once and then again becomes blank in further calls. I am using 2019a version (without updates due to offline computer) on Windows 10.
  2 个评论
Adam Danz
Adam Danz 2023-10-11
Please share the line where you're calling uisetcolor or give let us know if you are using any inputs.
Tek
Tek 2023-10-11
编辑:Tek 2023-10-11
First I have used it without any input but since blank screen only have option to close and without any input function doesn't return any value, I have decided to use it with previous color o f the button. The code snippet:
function results = ColorPicker(app, buttonnumber) %I have several buttons that I will use same color pick function
PickedColor = uisetcolor(ColorArray(buttonnumber, :)); % The different colors of the buttons are stored in rows of ColorArray as R G B triplets
ColorArray(buttonnumber, :) = PickedColor;
results = now;
end

请先登录,再进行评论。

回答(1 个)

Gayathri
Gayathri 2024-9-25
Hello @Tek,
I understand that you are getting a blank figure when calling “uisetcolor” in MATLAB R2019a version. But I am not facing this issue at my end.
One solution might be to change
obj.setupURL()
to
obj.URL = 'https://mathworks.com”
in "WebColorChooser.m” in your MATLAB folder.
You can also consider updating MATLAB to the latest version to solve the issue.
Hope you find this information helpful.

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by