LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubPanel visibility based on Boolean selection

Hi,

 

I'm fairly new to LabView and I have been working on this issue for the past few days.  Basically, what I'm trying to accomplish is this.  There will be approximately 8 buttons horizontally that each are to load a separate Subpanel, with each subpanel housing its own SubVI.  The Subpanels are to be overlapped, so that when, let's say, Button 1 is pressed, all other subpanels are to be hidden,  and solely Subpanel 1 to be visible on the main panel.  Subsequently, when button 1 is pressed, if another button is pressed, the status of button 1 would need to return to default state. 

 

I am not sure if this is possible, but for simplicity's sake, lets say there are only two buttons and two subanels.

 

Button 1, Button 2, Subpanel1, Subpanel2.  When Button 1 is depressed, only Subpanel1 would show.  When Button 2 is then depressed, Button 1 would become unpressed, Subpanel1 would become hidden, and Subpanel2 would become visible. 

 

Is there a way to accomplish this programatically? 

 

Thank you in advance,

 

Justin

 

0 Kudos
Message 1 of 6
(2,487 Views)

Use a radio button control and customize the control to replace the radio buttons with regular buttons. It's fairly easy to do. The LabVIEW Help explains how to customize controls.

 

As for handling the subpanel activation, a simple event structure that handles the radio button's value change event will work quite well.

Message 2 of 6
(2,476 Views)

Hi,

I have a suggession, In one subpannel you can display any no of vi's. 

For example 3 buttons with 1 subpannel can display 3 different screen considering A,B,C as your vi's to be displayed on subpannel.

 

On click of Button 1,2,3 can display A,B,C vi's respectively.

 

Find the image to load the vi into the subpannel.

Message 3 of 6
(2,472 Views)

I was thinking the same thing. Is there any reason you would want a subpanel for each vi? Just use one and load the apropriate subVI based on the user input.

=====================
LabVIEW 2012


0 Kudos
Message 4 of 6
(2,444 Views)

The one reason I can thing of is the overhead in loading the VI. With the panels already loaded, all you'd need to do is simply change their visibility. My assumption when I replied is that it was probably due to this.

0 Kudos
Message 5 of 6
(2,436 Views)

Thank you all for your help and suggestions.  I more than likely can probably go with one subpanel loading all of the vis.  My only concern and original thought process is that there is a chance that not all of the vis loaded within the subpanel would carry the same height/width properties and i did not want to force scrollbars if at all possible.  I was able to create the reloading vis into one subpanel with multiple buttons using your suggestion, and am working on the sizing of the subvis now, to make sure they don't have scrollbars in the subpanel.

 

If necessary, I suppose I could use a Property Node/Container Bounds/Height/Width if that would help not having any scrollbars.

0 Kudos
Message 6 of 6
(2,429 Views)