276 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

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...