How to change color of "Edit text" in the Gui

7 次查看(过去 30 天)
Well, I was programming my interface and it has various input data, in specific case, depending on input's value, my GUI shows in answer a string. I'm trying to show this text with other color, to call attention to this information, I tried to use some If programing but doesn't work, the answer always shows the same color.
Guys, Could you help me on this problem?
I'll show here for you understand what i'm saying
if ha==0
cabs1 = 'VÁCUO';
set(handles.CABS,'string',cabs1);
end
I need to show this text VACUO in red, help me plz;
Thanks

回答(1 个)

Walter Roberson
Walter Roberson 2014-3-27
  5 个评论
Walter Roberson
Walter Roberson 2014-3-27
编辑:Walter Roberson 2014-3-27
What happened instead?
Have you confirmed that the body of the "if" is being entered?
Harshit  Gupta
Harshit Gupta 2016-5-18
I used 'ForegroundColor' instead of 'Foreground' and it did change color.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by