10-17-2008 09:39 AM
So it sounds like you have what you need, correct?
Since the ability to set teh background color of a Picture was not exposed and since you seem to really be interested in doing this at run time I'll out line what could work.
1) Defer FP updates.
2) Set picture invisable.
3) Invoke node Get FP Image
4) Determine location and bounds of picture control.
5) Use bounds to extract image from region occupied by the picture from image obtained in #3
6) Set picture visable
7) Write image from step #5 to Picture.
😎 Undefer FP updates.
But why you would want to do this when starting with a picture with a transparent background (set at edit time) get you to the same place, I just don't understand.
Care to share your concerns?
Ben
10-17-2008 10:03 AM
10-17-2008 10:40 AM
Hi,
Now I understand, what you needed. ;). Property for background color of the Draw Area missing...
In addition to suggestions above you can do it also with XControl (they are so funny)
Very "quick and dirty" implementation in attachment (not "ready for use" - just idea).
Andrey.
07-26-2013 02:45 PM
There is a difference between transparent and visible -- this is particularly evident with a Tab control. For instance, a Tab Control with a transparent background can be a very useful way to change control and indicator layouts over a static background. It is sometimes useful to control transparency programmatically at runtime, and it may not be immediately apparent how to do this if you haven't done it before.
The easiest way to programmatically make something transparent (and non-transparent) at runtime is to use a transparent ColorBox constant. Simply drop a ColorBox constant on your block diagram and color it to "transparent" using the color picker tool. (See "ColorBox Constant.png" attached.)
If you want to construct the numeric value for transparency programmatically, it is essentially (R=255 + B=255 + G=255) +1. The method is illustrated in "Constructing Transparency.png" (attached).
08-14-2014 06:46 AM
Can partial transparency of a tab control be achieved?
06-26-2019 06:22 PM
As far as I know, there is no way to achieve partial transparency via a control property, as this would require an "alpha channel" value to specify the level of transparency. My understanding is that LabVIEW uses a single color, specified by a unique U32 RGB color value, to specify transparency, defined as follows:
Transparency = 255 [red channel] + 255 [green channel] + 255 [blue channel] + 1
or more specifically, Transparency = [U32]16777216
To illustrate, if you wire a U32 constant with a value of 16777216 into the "Colors:Foreground Color" and "Colors:Background Color" properties of your tab control, the tab control will become transparent when the Property Node update executes. Any value less than 16777216 will result in a color change to the expected RGB color. (Values greater than 16777216 appear to either produce an error or an unexpected color result.)
Perhaps in the future NI will provide additional U32 RGB color values in the range above 16777216 to specify variable transparency. For right now, this doesn't appear to be implemented (-- although I haven't tested all possible values between 16,777,216 and 4,294,967,296 to verify this assumption!)
Unless there is another way to do it, I don't think partial transparency is an option.
06-27-2019 07:57 AM
That's a lengthy for an answer to a question asked (off topic) 5 years ago...
06-27-2019 12:21 PM
wiebe@ CARYA,
Yes. Yes it was...
But, if one persons has the question, someone else may be thinking the same thing!
06-28-2019 01:47 AM
@The_Seeker wrote:
wiebe@ CARYA,
Yes. Yes it was...
But, if one persons has the question, someone else may be thinking the same thing!
Well, it did get 26 views in those 5 years .
Anyway, the question isn't exactly clear. Partially transparent doesn't specify what parts should be transparent and what parts shouldn't.
I'd probably end up with a fully transparent TabControl, and use it as an enum to switch the content of a transparent SubPanel. The SubPanel can be aligned to look exactly like a TabPage. The TabControl can actually be minimized so it doesn't seem to have a page at all. You'd be using just the page selection part.
06-28-2019 02:24 AM
wiebe@CARYA wrote:
Well, it did get 26 views in those 5 years .
Actually, the question got 500 views...