04-06-2011 05:32 PM
Sorry for asking such a dumb question, why can't I make my number
background green. I've tried every combination of properties and can't
seem to get it to work. See my enclosed vi.
Solved! Go to Solution.
04-06-2011 06:04 PM
Text is in a CONTAINER, which has its own properties.
You are setting the background color of the CONTAINER.
The property you want is Numeric Text - Text Colors - BGcolor.
Not Numeric Text - Colors - BGColor.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-06-2011 06:18 PM
Well This is what I did.
New Vi
Placed an integer indicator on FP, not a container.
Thats it.
04-06-2011 06:22 PM
That worked.
Thanks
I don't know why it was called a container ?
04-06-2011 06:51 PM
CONTAINER is my word not NI's
In general, anything that displays characters of text has a text container - it's an object within the object.
The container doesn't have anything to do with the indicator being a STRING or a NUMERIC, or a TABLE, or a whatever.
It's sole purpose in life is to display text.
A STRING indicator will own one, a NUMERIC control will own one, a TABLE might own a bunch of them.
That is so that all text containers can be treated alike by all methods and properties that pertain to text.
And thus, it has its own set of properties.
Note that the TEXT has a complete submenu of its own, including a REFERENCE?
That means you can pass a reference to a text container around to various VIs and they don't know (or care) whether that text is in a STRING indicator or a NUMERIC control, or a Label, or what. Anything you can do to text on a panel, they can do it without regard to where it is.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-06-2011 07:02 PM
If you look at a NUMERIC's property list, you don't see TEXT, you see NUMERIC text.
This is a child object (I'm guessing here, I have no internal knowledge) of the TEXT container.
YOu can set the NUMERIC TEXT : TEXT property, and the value of the control reflects it.
I've been wanting a way to blank a numeric indicator, alas, you cannot set the NUMERIC TEXT: TEXT property to an arbitrary string: it'll just ignore you. That's why they used a child object, I bet: it performs specific things (numeric validation) on top of the generic behavior of the TEXT container.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-06-2011 07:17 PM
I chased that game around for while.
Solution = very large hammer.
I created a box the right color for the blank field
I wanted, and set it to be the frontmost. Setting and clearing the
visability did the trick. VERY KKKRUDE, but it worked.
Thank for your help
04-06-2011 07:27 PM
Yes, we all have to get crude now and then.
Notice that the numeric control/indicator will actually own THREE of the text containers:
One generic one for the caption.
One generic one for the label.
One numeric-style one for the actual value.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-06-2011 11:14 PM
@CoastalMaineBird wrote:
I've been wanting a way to blank a numeric indicator, alas, you cannot set the NUMERIC TEXT: TEXT property to an arbitrary string: it'll just ignore you.
Here is my current kludge to blank a numeric indicator:
04-07-2011 06:17 AM
Yeah, that works and I've done that too. I'd like something that works thru the DATA side, though.
That idea, and the one I looked at above, both use PROPERTIES, meaning that I can't use strict TYPEDEFS, and you can't use them in arrays.
Blog for (mostly LabVIEW) programmers: Tips And Tricks