04-01-2017 09:18 AM
There are no scenarios where I want a visible border/bezel.
Then I don't understand why you wanted to do it with property nodes.
`Like I said above, paint one the way you like it, paste it on a VI called "My Handy Stuff" and Leave it there. Anytime you want one, open that up and copy it.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-02-2017 11:14 PM
Okay, sweetie, let me explain.
For simplicity and code commonality with the other thousands of indicators (boolean, string, numeric, enumerators) in this application, I prefer to use property nodes to change background, border, and text colors for these scenarios: in-range data values, high values, low values, and data invalid.
The next person who modifies the code, long after I am gone to my old home in Virginia, might have new requirements/scenarios. That 'guy' will have to ask the same question on the forums and tolerate the abuse as well.
04-03-2017 07:54 AM
I've been writing LabVIEW programs for a while now and I've never had a requirement that I needed to change the background color of a string control to go from transparent to non-transparent at run-time. But if you do have this requirement it seems you'll probably have multiple controls that you change the visibility of since this doesn't seem possible through property nodes. There are still several things you can't do through scripting and property nodes that you must do manually as a developer, this appears to be one of those things.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-03-2017 08:57 AM
@MinerHokieRamp wrote:
For simplicity and code commonality with the other thousands of indicators (boolean, string, numeric, enumerators) in this application, I prefer to use property nodes to change background, border, and text colors for these scenarios: in-range data values, high values, low values, and data invalid.
And that's a direct contradiction to your previous statement where you said "there are no scenarios where I want a visible border/bezel."
04-04-2017 09:10 AM - edited 04-04-2017 09:12 AM
@Hooovahh wrote:
I've been writing LabVIEW programs for a while now and I've never had a requirement that I needed to change the background color of a string control to go from transparent to non-transparent at run-time. But if you do have this requirement it seems you'll probably have multiple controls that you change the visibility of since this doesn't seem possible through property nodes. There are still several things you can't do through scripting and property nodes that you must do manually as a developer, this appears to be one of those things.
I have done this when I needed to flash the control a specific color during execution. (Transparent = nominal, Yellow BG = slightly out of range, Red BG = significantly out of range. I'd have loved to have had an alpha channel as well, since when it was Yellow / Red it blocked the image the control was over.)
And yes, it was a string for the output, not a numeric.
04-04-2017 09:50 AM - edited 04-04-2017 09:52 AM
Well you can set the Text >> BG Color from transparent, to non transparent at run-time. But what you can't do is set the border color to transparent. So you can still color the whole control transparent manually, then use the property node to set it from solid color, to transparent. Just tested this in 2016 with a classic string control and it works as expected.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-04-2017 10:07 AM
Just examined that as well, and you are right, I was changing the Text->Colors->BG/FG colors. Not the border colors.
Going to have a long talk with my memory sometime later I think.
04-04-2017 10:13 AM - edited 04-04-2017 10:13 AM
I have done this when I needed to flash the control a specific color during execution. (Transparent = nominal, Yellow BG = slightly out of range, Red BG = significantly out of range. I'd have loved to have had an alpha channel as well, since when it was Yellow / Red it blocked the image the control was over.)
If you change the TEXT BG and TEXT FG, that's legal, but slow, because it has to go thru the property nodes.
I've achieved the same effect by having the indicator be fully transparent, and having a color box, the same size as the text indicator, behind it.
Set the color box to transparent (gray), or yellow, or red, and you get much faster performance.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-04-2017 10:18 AM - edited 04-04-2017 10:19 AM
@CoastalMaineBird wrote:
I've achieved the same effect by having the indicator be fully transparent, and having a color box, the same size as the text indicator, behind it.
Set the color box to transparent (gray), or yellow, or red, and you get much faster performance.
That's a good solution if you are blinking fast. But if you are switching the to the UI thread once every couple of seconds to flash red to transparent I doubt it matters much. But if you are looking for a 10hz blink, or something similar I would agree.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-04-2017 10:28 AM
That's a good solution if you are blinking fast.
The purpose is not to blink fast.
I had a screen with 60 indicators, each one checking alarm levels at 10 Hz, with 4000 other things to do.
If you use the background ColorBox, then you're just moving a data value, rather than going thru a property node.
So I just did the comparison and put the results on screen. Without property nodes, LV figures out whether it needs to be redrawn in a few uSec. Property Nodes take a few mSec EACH.
Blog for (mostly LabVIEW) programmers: Tips And Tricks