Text box foreground color remains light grey in MATLAB GUIDE

3 ビュー (過去 30 日間)
TYo
TYo 2016 年 9 月 9 日
コメント済み: Mischa Kim 2016 年 9 月 9 日
I have a GUI with many text boxes for different purposes.The problematic ones serves the following role:
- the user chooses a value in a dropdown menu
- the value is compared with another value
- depending on the value, a corresponding message should appear in the problematic text box in BLACK
In the preview you can see how the MESSAGE appears in GREY in the TEXT BOX. The second screen shot shows that in the settings of the box I have specified "BLACK" as foreground color.
Any ideas why does it give the text in light gray?
Thanks in advance. Lina
  2 件のコメント
TYo
TYo 2016 年 9 月 9 日
The problem was NOT solved by manually putting the foreground color of the text box in the "Editor". I tried this code:
set(hObject,'ForegroundColor','black');
after the CreateFcn line:
function edit24_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'ForegroundColor','black');
set(textBoxHandles,'groundColor',originalBGColor)
end
Mischa Kim
Mischa Kim 2016 年 9 月 9 日
Please attach your code.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by