uieditfield background color affected by its parent

조회 수: 15 (최근 30일)
Marko Gulin
Marko Gulin 2019년 7월 29일
편집: Marko Gulin 2019년 7월 29일
Hi all,
I noticed odd behavior of the uieditfield background color property - it is affected by its parent background color, as shown in the following example.
In all three case, the background color of the uieditfield object is set to 'black'. As it can be seen, the displayed background color is affected by its parent background color. I suppose this has something to do with opacity/transparency, but it seems that uieditfield does not have this property.
How can I get pure BLACK background color in all three cases?
Please find attached the minimum working example.
Thank you!
  댓글 수: 1
Marko Gulin
Marko Gulin 2019년 7월 29일
편집: Marko Gulin 2019년 7월 29일
I found what is causing the problems: the 'Editable' property is set to 'off'. Now the question is: how can I have the 'Editable' property set to 'off', and still have the pure black background?
I found a workaround to this problem: create an empty label with black background, and place it behind the uieditfield. Is there a more elegant solution to this problem?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by