11-14-2006 04:23 PM
11-15-2006 06:36 AM
11-15-2006 08:13 AM
Hello wb2nvy,
In each cluster, the color box which is item 0 is for the foreground color, item 1 is for the background color. You can check which is which by selecting the cluster, right click, and select reorder controls in cluster.
Based on Ben's and Chris's replies, it is probably best to put the same color code in for both the fg and bg colors for all of the modern controls. That way the property page dialog matches the actual fg colors that are used. I still don't see where the bg color gets used in the modern controls.
The elements in the array work out as follows:
0: false 1: true 2: false going true 3: true going false
(Items 2 and 3 come into play on controls that have a "when released" operation.)
-Bill
11-15-2006 08:31 AM
11-15-2006 09:08 AM - edited 11-15-2006 09:08 AM
Message Edited by Aristos Queue on 11-15-2006 09:09 AM
11-15-2006 11:19 AM
wb2nvy,
I find the best way to use the help files is to use context help. Turn it on with Ctrl-H. That is where I found the info for the colors(4) property. Hovering over that property node brought up a little information, and then you can click on detailed help to get the full help system to come up with that info already selected.
I do this a lot when I see a VI icon I don't recognize to see what the VI is and what it does. I usually discover how the more advanced functions work this way.
-Bill
11-15-2006 03:12 PM
I thought I would chime in with some explaination of what is going on with the property pages and the propery node for the colors on the Boolean.
Before we get into that, lets talk about how colors are used generally in LabVIEW, as this may explain some other behavior that you may have noticed with the color squirt tool or color sampler tool.
LabVIEW controls are made up of cosmetic parts made up of images. The word "image" here is a bit overloaded, but that is what we call them. An image in LabVIEW includes not only bitmaps, but also routines to draw the 3D/modern glyphs you see as buttons. Images in LabVIEW, are free to define how they use the colors that they are passed, i.e. their foreground and background colors can be used or discarded as the image developer sees fit. Generally, we have tried to be consistent here, but as this thread demonstrates the modern images are a departure from the classic images.
Here are some simple rules that we generally follow:
3D images generally only use their foreground colors.
2D images generally use both colors as you would expect.
Bitmaps images disregard the colors entirely.
System images either can use the colors or not depending if the theme of the system allows for it. That is, on Windows XP if you sample the color of a Boolean, you will not get the light blue halo color, but instead some color that looks kind of greyish.
Now with that in mind, the property pages. The property pages really don't know what kind of image is in the Boolean control, so when it queries the control for colors it only asks for the background color. This gives a good (but incomplete) result for classic type images, but it is completely off for modern images, and is a source for confusion.
As shown in previous post, when it writes the colors properties, it writes both as the same color. This way, it (kindof) works for both 2D and 3D images. That said, these colors really don't make any sense for a system control or even a Boolean control customized with a custom bitmap.
Bill is spot-on about what the elements are for the array of colors that you pass to the colors property.
I don't know if anyone is still confused about this property or the property pages after reading this thread, it seems like you guys have it pretty figured out. If anything is still confusing, please respond in this thread and I will try to answer anything about this that I can.
Jeff Peters
LabVIEW R & D
11-15-2006 04:20 PM
Hello everyone,
Wow - this is quite an impressive thread that does clarify many issues with LEDs in LabVIEW. Just so you know, this issue was reported to R&D (#43E7CHXC) for further investigation into the possibility of improving the help for that property.
Thanks for helping us make LabVIEW an even better product!
Janell R | Applications Engineer
11-15-2006 06:05 PM
After awhile thumbing through Labview options, I have found that there is a way to change the colors of blinking booleans!! Now problaby it is only me who cares, but the yellow is too loud. By going to Tools> Options> colors, there is options for changing blinking foreground and background colors.
Chris
11-16-2006 06:07 AM