uieditfield background color affected by its parent

1 view (last 30 days)
Marko Gulin
Marko Gulin on 29 Jul 2019
Edited: Marko Gulin on 29 Jul 2019
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 Comment
Marko Gulin
Marko Gulin on 29 Jul 2019
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?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!