LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows 2000 colour problem

I'm trying to make my LabVIEW program look as much as a standard Windows program as possible, so I check the "Use System Color" box in the VI properties window.
When I'm using the "Dialog Recessed Frame" box, I want to write a short label on the upper left corner of the box, like in an ordinary Windows program.
However, since Windows 2000 and Windows 98 is using different background colours, I can't make the colour of this text label match with the background colour. Is there any way to set the colour of an LabVIEW object to the system default colour?
0 Kudos
Message 1 of 10
(2,919 Views)
Can't you just set the background of the string to be transparent?

Simon Gustavsson wrote in message
news:506500000008000000A82D0000-1002247793000@exchange.ni.com...
> However, since Windows 2000 and Windows 98 is using different
> background colours, I can't make the colour of this text label match
> with the background colour. Is there any way to set the colour of an
> LabVIEW object to the system default colour?
0 Kudos
Message 2 of 10
(2,919 Views)
If I set the background colour of the label to Transparent, the dialog recessed frame will be visible through the letters as well. I want the label to completely cover the frame.
Taka a look at any standard Windows program, and I think you'll see what I mean.
0 Kudos
Message 5 of 10
(2,919 Views)
In the color pallette choose the box that has the little "T" in it. This will make the color transparent.
0 Kudos
Message 3 of 10
(2,919 Views)
If I set the background colour of the label to Transparent, the dialog recessed frame will be visible through the letters as well. I want the label to completely cover the frame.
Taka a look at any standard Windows program, and I think you'll see what I mean.
0 Kudos
Message 4 of 10
(2,919 Views)
Ah, I see what you are trying to do now. I don't know of a way to do that, but would also be interested if someone else knew.
0 Kudos
Message 6 of 10
(2,919 Views)
Write the text in a flat string indicator and set its BG and FG colors to system color using a property node. To get system color I have made a small VI that uses system color and read its own panel color using the Get Panel Image method.

Instead of a flat string you could also use a text label as usual and set its color property but the refnum to a text label is harder to get from the panel decorations list.

Jean-Pierre Drolet


LabVIEW, C'est LabVIEW

0 Kudos
Message 7 of 10
(2,919 Views)
Could you send a small image showing what it is you are talking about?
0 Kudos
Message 8 of 10
(2,919 Views)
Simon,
My solution for this is close to what was said by Jean-Pierre. Attached is a VI that shows how it works. The VI sets the FG and BG color of text on a dialog recessed frame box. The color of the frontpanels window is used. I hope this helps. /Mikael
Message 9 of 10
(2,919 Views)
Great. Now no need to read the window picture to get the panel color. The
old get picture technique was for LabVIEW 5.1.

By the way, you do not need the path control and Open Reference node to use
your VI. If you leave unwired the refnum input of the Panel property node,
the property applies the the VI by default.

Jean-PIerre


LabVIEW, C'est LabVIEW

0 Kudos
Message 10 of 10
(2,919 Views)