uieditfield background color affected by its parent

1 次查看(过去 30 天)
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 中查找有关 Develop uifigure-Based Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by