Color change

This is the main technical forum for discussing problems that were encountered by users while developing PROMOTIC applications, and their possible solutions.

Color change

Postby carnifex1992 » Sun 30. Mar 2014 20:36:19

Hi all!
Could You pls help me... Im suck on one thing...
I have to turn on electric motor I already made buttons on/off to do that, but i want make the motor image turns green or red [ green = on, red = off]
i cant realy find on tutorial how could i do that...
thanks for understanding..

Regards :)
carnifex1992
 
Posts: 8
Joined: Sun 30. Mar 2014 20:30:28
Location: Latvia

Re: Color change

Postby carnifex1992 » Mon 31. Mar 2014 12:46:18

got it by myself!! :))
if someone has an interes - just make two copies of your image; at page - item, select binding for "visible" [general expression] put up your variables, write expression and your image will be visible depending on your parameters[ before all that set your wanted color], after seting this to both copies put them on each other and vuala. :)
carnifex1992
 
Posts: 8
Joined: Sun 30. Mar 2014 20:30:28
Location: Latvia

Re: Color change

Postby Tomáš Bräuer » Tue 01. Apr 2014 8:49:10

Hi carnifex1992!

yes, the solution you have found is a correct basic one and is always working.

Under some circumstancies there is another solution possible:
Using one monochromatic image on which is applied color light (e.g. green, red). The operation light color can have binding as well.

So that instead of exchanging 2 completely different images with dbind, you change 2 color lights with another dbind. Our images in PROMOTIC resource folder are usually designed with possibility to change its color with colored light in mind. But not all images can be usable in two colors. It depends on image itself.
Tomáš Bräuer
Administrátor
 
Posts: 153
Joined: Thu 13. Dec 2012 9:13:13

Re: Color change

Postby carnifex1992 » Wed 02. Apr 2014 14:10:32

Thanks, I'll give it a try with this method too ;)
carnifex1992
 
Posts: 8
Joined: Sun 30. Mar 2014 20:30:28
Location: Latvia


Return to I don't know how to...

Who is online

Users browsing this forum: No registered users and 4 guests