From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug?] Color box in a strict typedef cluster in a subpanel can't select a color

I'm working on a program where I had a strictly defined cluster.  In that cluster was a color box.  The VI ran just fine (I could select a color) normally but when added to a subpanel I could no longer select a color. Changing the control to non-strict typedef fixed it in the subpanel.  I have attached a project showing the behavior.

 

If someone can verify that they see this, and that it isn't intentional (I can't think of any reason it would be) I'll add it to the monthly bugs thread.

0 Kudos
Message 1 of 12
(3,672 Views)

Duh!  I was running around trying to find a reasonable explanation when the answer was right under my nose.  You are creating a Control or Indicator, which means that the quantity you call "Color Box" takes a value.  Until you set the value of Color Box, it will take the Default Value of 0, which turns out to be Black.  If you want your SubPanel to open with a Red Color Box, you need to initialize the Cluster to put "Red" in the Color Box (otherwise it will continue to show 0 = Black).

 

Bob Schor

Message 2 of 12
(3,658 Views)

The color box is a control of course (int numeric data type).  The problem is that I can't change the value of that control if it is in a subpanel.

 

Edit:  To clarify, ANY control that is inside of a subpanel you should be able to change unless it is disabled.  The mouse pointer changes to a finger like it should, but clicking it does not bring up the color select menu like it is supposed to with a color box.

0 Kudos
Message 3 of 12
(3,651 Views)

HI BowenM,

 

You are loading the VI as a subpanel, which is being loaded with the default color. I have attached an article that explains more about subpanels:

 

http://digital.ni.com/public.nsf/allkb/D587067E18E0E70186256D44007B91FE

 

The purpose of the subpanel is to just display the front panel of a VI. Is there a reason you are trying to change the color? I would recommend setting the default color as red if you always want red to show up. Is there a reason you are trying to use a sub VI? Why don't you just place the type def on your main VI? 

0 Kudos
Message 4 of 12
(3,581 Views)

@RoxtheFox wrote:

HI BowenM,

 

You are loading the VI as a subpanel, which is being loaded with the default color. I have attached an article that explains more about subpanels:

 

http://digital.ni.com/public.nsf/allkb/D587067E18E0E70186256D44007B91FE

 

The purpose of the subpanel is to just display the front panel of a VI. Is there a reason you are trying to change the color? I would recommend setting the default color as red if you always want red to show up. Is there a reason you are trying to use a sub VI? Why don't you just place the type def on your main VI? 


I... don't care what the default color is. Obviously it can be initialized to anything I want, but I don't want an indicator.  I want a control, which in the case I described the user can not change it.

 

Why do I need it in a subpanel?  Not relevant.  I have already "solved" my problem, I'm just reporting a bug.

0 Kudos
Message 5 of 12
(3,573 Views)

It smells like a bug to me.

0 Kudos
Message 6 of 12
(3,558 Views)

If I execute the example you provided I can not choose a color. I think this is not correct / a bug.

 

If I add a while loop to 'subpanel.vi' and run it ('Run VI' invoke node in 'main.vi'), then I can choose a color as long as 'subpanel.vi' is running.

 

Edit: LabVIEW2015, 15.0f2 (32-bit)

Message 7 of 12
(3,503 Views)

Thank you everyone. I reported the bug. 

0 Kudos
Message 8 of 12
(3,480 Views)

Hello Roxana,

 

do you have a CAR number?

 

UliB

0 Kudos
Message 9 of 12
(3,416 Views)

Hello UliB,

 

It's 584474, but it was rejected.

 

Thanks

0 Kudos
Message 10 of 12
(3,400 Views)