LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the border color of a system control?

I notice that when you pick a system control (such as a string, or a numeric), the box around the border has a color that looks like grayish-blue.  Where does this color come from?  I do not see it in the 6 system colors listed in the color picker.  Also, in a system enum, the drop down box control seems to have a similar color.  Is this a system color too?
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 1 of 9
(3,887 Views)

Hi S G,

Thanks for contacting National Instruments.  I have been reading over your post and I have a few questions for you.  First of all, what version of LabVIEW are you using?  Second, where are you seeing the grayish-blue box around the border?  On the front panel or the block diagram?  I have been looking at the system controls on my computer and I am not seeing the colored box on my front panel.  Also, where exactly are you accessing this "color picker" and could you walk me through the steps that you are taking to get there?  When you ask where the color is coming from, what exactly are you trying to know?  Are you wanting to duplicate the color in another place?  Please let me know what you think and we can go from there.  Thanks!

Regards

Noah R
Applications Engineering
National Instruments
0 Kudos
Message 2 of 9
(3,853 Views)
Here are the answers to your questions:
1.  I'm using LabVIEW 8.5
2.  The colored box is the one visible as a border of the system numeric on the front panel.  It is a rectangular box made up of lines that are one pixel thick.  In the control editor, this shows up as the frame in the parts window.  This same color is also visible in the control that opens the drop down box in a system enum.
3.  The color picker is the window that is visible when I have the paintbrush tool selected and I right click on a control.  A window comes up that has all the RGB colors visible, as well as 6 system colors that I can pick.
 
The reason I want to find this color is because I am trying to make custom controls that use the system colors.  The color that is used is not listed in the 6 system colors in the color picker.
 
 
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
Download All
0 Kudos
Message 3 of 9
(3,849 Views)
I haven't seen it on the system color list either, but the color is R:127,G:157,B:185.
0 Kudos
Message 4 of 9
(3,839 Views)
Well, it's R:127,G:157,B:185 only assuming we're talking about the Windows XP style with the default blue color scheme.  At least for now, you can lift the RGB values, but the trouble is that it will change if the target computer is using some other theme or some other operating system (Vista?).  If what we're observing is true, maybe this is a good candidate for the NI suggestion box.
Message 5 of 9
(3,835 Views)
Mr Jim is right, the color changes when you change the color scheme.  You can see the difference in the Screenshot.doc that I attached earlier: both images are of the same front panel with no changes except that the color scheme was windows default (blue) for the first one, and then Olive green for the second one.
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 6 of 9
(3,827 Views)

Also, just out of curiosity.  Matthew Kelton, how did you figure out what the RGB values for the frame were when the color scheme is Windows XP default blue?  I don't see it listed anywhere. 

Message Edited by S G on 10-02-2007 01:53 PM

S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 7 of 9
(3,821 Views)
Sorry, I'm not Matthew, but I've always accomplished this via M.S. Paint.  If you open a screenshot of the control in Paint, magnify and use the dropper tool, you'll acquire the color.  Next, from the top menu, select Colors->Edit Colors, and click on define custom colors.  Your RGB value will be on the right.  I'm sure you could use a bunch of other graphics programs to do this, but everybody using Windows has paint.

It's also a nice trick for stealing colors from logos or websites.

Jim
Message 8 of 9
(3,810 Views)
The System Color section of the picker has not changed in sometime.  It appears NI has not kept it up with the advances in XP, Vista.  XP introduced Themes and using the WinAPI, several theme colors are not registered as system colors.  In fact, when I was playing around, if you have the WinXP style selected, and go into advanced color setup, you cannot change the color of the window title bar.  After changing colors, the colors will have no affect after applying all your changes.

You can find installed themes at c:\windows\resources\themes.  It uses msstyles files which define all the colors.

MSDN has a lot of info here about it, but I don't have the time to look into the depth of it all at this point.

The only way currently you're going to be able to do this is to find the color from the style engine and programatically set the color scheme of the control.

The good news is that if you only worry about registered Microsoft themes (a user has to hack windows to install other themes), there are only three themes/colors you need to worry about (for XP).  There should be a way to determine what theme is in use. and then change the color accordingly.
0 Kudos
Message 9 of 9
(3,783 Views)