LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding items in case structure

Solved!
Go to solution

How can I hide the items if not selected in the radio button? In the vi below, I want to hide K and thickness (L) if conduction is not chosen and the same for Convection and radiation.

 

1.PNG2.PNG

0 Kudos
Message 1 of 6
(2,474 Views)
Solution
Accepted by topic author Jasem12

Hi Jasem,

 

several options:

1. Use a tab container and place the corresponding items/controls on several pages. Name the pages the very same way as the options in the RadioButton and you could directly wire from radiobutton to tab control( local variable) to select each page…

2. Use property node for each control and show/hide the controls as needed. (This usually makes a very bad UX: you better enable/disable+gray those controls!)

3. Use a subpanel container. Show a subVI in the subpanel. Select the VI to be shown based on the radio button. (Similar to the LabVIEW options dialog: each selection ín the left listbox simply loads a new VI to the subpanel to the right!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,471 Views)

@GerdW wrote:

Hi Jasem,

 

several options:

1. Use a tab container and place the corresponding items/controls on several pages. Name the pages the very same way as the options in the RadioButton and you could directly wire from radiobutton to tab control( local variable) to select each page…

2. Use property node for each control and show/hide the controls as needed. (This usually makes a very bad UX: you better enable/disable+gray those controls!)

3. Use a subpanel container. Show a subVI in the subpanel. Select the VI to be shown based on the radio button. (Similar to the LabVIEW options dialog: each selection ín the left listbox simply loads a new VI to the subpanel to the right!)


I don't see much difference in the two methods described in 2, except that, in dev mode, you'll have a tough time finding the hidden control.  In both cases, you would have property nodes in the same exact places performing similar actions.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 6
(2,454 Views)

Hi Bill,

 

I don't see much difference in the two methods described in 2

From UX (User eXperience) point of view it is annoying to show/hide controls (as long as you need to make the frontpanel as large as needed to show all of those controls). Making them disabled&grayed is recommended.

But the OP explicitely asked for "hiding", that's why I mentioned both options…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 6
(2,445 Views)

If using Gerds #2 i'd say it's good to Place the Controls in a cluster, that way you only need 1 Visible/Disable-node for each.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 6
(2,423 Views)

@Yamaeda wrote:

If using Gerds #2 i'd say it's good to Place the Controls in a cluster, that way you only need 1 Visible/Disable-node for each.

/Y


I would make an array of references of the controls and then just create a 2D array constant containing the state of each control based on the selection.  Then you just use Index Array to get the states and a FOR loop to set the state for each control.  This would be a simple subVI to write.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(2,411 Views)