543 views
in GUI Development by
Dear all,

is there a way to change the text colour of a view text object when the background colour changes?

For example, in the Main page of our control panel there is a text which has white colour on a dark bakground. The user change the background image, with a very light colour and the white text is no more visible.

How to solve this?

Thanks in advance

Best regards

1 Answer

0 votes
by

Hi,

you can change the color of the text view explicitly. An automatism to adjust the color of a view depending on the background contents is not available. It's finally up to you decide, which color should be used for the view. 

Usually, such problems are solved by displaying in the background of the text a small semi-transparent rectangle, so the background appears darker. Other approach is to use two text views, one arranged above the other. The text view in the background is moved few pixels right/down and is displayed with darker color. This results in a kind of shadow effect, so the text in foreground can be recognized better even on a bright background.

Hope it helps you.

Best regards

Paul banach

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...