12-20-2012 02:28 PM
I have seen many Labview program which has a "Picture constant" but with a specific color. I have tried doing it but I just cannot figure out how to get it.
Can some one help me
G
Solved! Go to Solution.
12-20-2012 02:33 PM
Sounds like you are looking for a Color Box Constant. It can be found in the Dialog and UI palette, or buried in the Picture Functions subpalette in Graphics & Sound.
12-20-2012 02:36 PM
Do you mean a picture constant or a color box constant?
The first is the datatype of the data that goes into a 2D picture control. The second is used to specify the color of things. If the later, do a search on the function palette for "Color Box Constant".
Mike...
12-20-2012 02:42 PM
No not really a color box constant. I was trying to have a " 2D Picture Constant". I figured out how to do it.
We can actually put the 2D picture in the front panel, and then go to block diagram and convert it into constant and add color to it by pressing ctrl+right click and change color to it.
It didnt strike me earlier to try this way. But it works now. Is there any other easier way to do this?
G
12-20-2012 02:45 PM
Yes you can set the apparent color of a picture constant, but it doesn't do anything useful. If you wire that constant to an indicator the indicator will stay the same default white.
What exactly is it that you are trying to do?
MIke...
12-20-2012 02:46 PM - edited 12-20-2012 02:50 PM
12-20-2012 03:01 PM
Hello Mike,
I am trying to replicate a program just to understand the nuances of LabVIEW. One of the prrgram which I saw has the feature to change the front panel color based on when we click. At the block diagram they seem to have a picture constant, which was what I am trying to find.
And you are right. The indicator just seems to be at white. I am not sure how they have done it then..
12-20-2012 03:11 PM
It looks like what they might have done is drawn the color into a picture color and then turned the control into a constant. With this the colored area will be of a fixed size.
Mike...
12-20-2012 03:24 PM
@mikeporter wrote:
It looks like what they might have done is drawn the color into a picture color and then turned the control into a constant. With this the colored area will be of a fixed size.
Mike...
It doesnt seem to work even like that. I went to Advanced- Customize and tried adding an image, and tried changing the color there. In both the cases, it doesnt seem to work.
12-20-2012 03:32 PM
For the code in the screen shots to work there has to be some data in the constant - which means something must have been drawn to it. You're talking about changing the appearance of an indicator, which has no effect on the data it contains. What you did was comparable to changing the background color of a numeric control, it has no effect on the data in the control.
What might be confusing you is that the background and the data in a picture control are both visual, but they are still separate.
Mike...