318 views
in GUI Development by
Hi, EW team:

        Customer requires that the color of an icon in a slide be inverted against its background color , especially when the boundary of slide bar cuts the icon. It would be more intuitive if you could see my uploaded image.

       I'd like to know if there is an easy way to implement such an effect.

        https://ask.embedded-wizard.de/?qa=blob&qa_blobid=9658055114849473740

      Thank you.

 

Best regards.

Stephen

1 Answer

0 votes
by
 
Best answer

Hello Stephen Rong,

involving the background color is not possibly. What you can do is to display the icon twice: one half in color A and second half in color B. 

To achieve this effect you will need two Image views arranged side by side as demonstrated below. One Image view is intended to display the image in color A the second Image view in color B:

Now using the property ScrollOffset of the both images adjust the horizontal position of the displayed images so that they overlap:

At the runtime, when the edge between the both images moves, update the ScrollOffset properties only.

I hope it helps you further.

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

...