テキスト文字が Figure の背景色と異なるのはなぜですか?

16 views (last 30 days)
MathWorks Support Team
MathWorks Support Team on 16 Jul 2013
次のコマンドを実行すると、スクリーン上に文字が表示される時に点滅するように見えます。
fg=figure('units','normalized');
bgc=get(fg,'color');
uh=uicontrol(fg,'style','text','units','normalized','position',[0.1 0.3 0.3 0.1], ...
'string','TEST','backgroundcolor',bgc);
Figureが表示される時、テキストの背景色は Figure の背景色より明るく、その後 Figure の背景色と同じ色になります。テキストの背景色を初めから Figure の背景色と同じ色にする方法を教えてください。

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Jul 2013
MATLABはデフォルトの構成要素背景色としてGUI が動作しているシステム上で、標準的なシステム背景色を使用します。この色の種類はコンピューターシステムによって異なります。例えば、灰色の色合いは Windows と UNIX で異なり、GUI のデフォルト背景色が一致しないことがあります。
問題を回避するには、MATLAB 起動時に次のコマンドを実行してください。
set(0,'defaultuicontrolBackgroundColor',get(0,'defaultFigureColor'))

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!