LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> Enable/Disable & Show/Hide Controls, VIs that disable, enable, hide, & show controls.
kbersch
post Oct 30 2007, 10:19 PM
Post #1


Enough LAVA to be dangerous


Member
Posts: 4
Joined: 23-March 04
From: Mesa, Arizona, USA
Member No.: 323
Using LabVIEW Since:2001
LV:8.2.1 ,6.0.2 ,.
United States Nothing Selected Nothing Selected


I've had several VIs to hide and/or show and enable and/or disable controls and indicators on the front panel. After some discussion on Info-LabVIEW I cleaned them up and combined them. Here are two VIs. One will disable, disable & gray, or enable selected controls on the front panel of the VI it is used in. The other will hide or show (make invisible or visible) selected controls on the front panel of the VI it is used in. Documentation is on the front panel of these VIs as well as in the description of each control/indicator.Kelly Bersch[attachment=7451:Disable_...Controls.vi][attachment=7452:Hide_Show_Controls.vi]I should have included the fact that these VIs are for LabVIEW 8.2.Kelly


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Oct 30 2007, 10:19 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Anders Björk
post Oct 31 2007, 09:57 AM
Post #2


Very Active
***

Member
Posts: 125
Joined: 31-July 06
From: Stockholm
Member No.: 5713
Using LabVIEW Since:1996
LV:8.5 ,7.1.1 ,8.0.1
Sweden Nothing Selected Nothing Selected


QUOTE (kbersch @ Oct 30 2007, 11:19 PM) *
I've had several VIs to hide and/or show and enable and/or disable controls and indicators on the front panel. After some discussion on Info-LabVIEW I cleaned them up and combined them. Here are two VIs. One will disable, disable & gray, or enable selected controls on the front panel of the VI it is used in. The other will hide or show (make invisible or visible) selected controls on the front panel of the VI it is used in. Documentation is on the front panel of these VIs as well as in the description of each control/indicator.Kelly Bersch[attachment=7451:Disable_...Controls.vi][attachment=7452:Hide_Show_Controls.vi]I should have included the fact that these VIs are for LabVIEW 8.2.Kelly


Nice Work!


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
kbersch
post Jul 11 2008, 05:57 PM
Post #3


Enough LAVA to be dangerous


Member
Posts: 4
Joined: 23-March 04
From: Mesa, Arizona, USA
Member No.: 323
Using LabVIEW Since:2001
LV:8.2.1 ,6.0.2 ,.
United States Nothing Selected Nothing Selected


I've updated my Show/Hide and Enable/Disable controls VIs so they recursively find control refnums. This allows them to now find controls in Tabs and Clusters. You will need to make sure no two clusters/tabs have identically named controls or this will affect all of them.

There are two more VIs along with these because they are used in the recursive search. They are modified versions of the "Get controls on tabs.vi" written by Dave A. Graybeal. All four VIs need to be in the same folder. These VIs were written with LabVIEW 8.5.1.
Attached File(s)
Attached File  Disable_Enable_Controls.vi ( 42.72K ) Number of downloads: 142
Attached File  Hide_Show_Controls.vi ( 38.97K ) Number of downloads: 128
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
JiMM
post Jul 11 2008, 06:53 PM
Post #4


Very Active
***

Member
Posts: 94
Joined: 11-October 07
From: Tarboro, NC
Member No.: 9577
Using LabVIEW Since:2001
LV:7.1 ,. ,.
United States us_north_carolina Nothing Selected


QUOTE (kbersch @ Oct 30 2007, 06:19 PM) *
I should have included the fact that these VIs are for LabVIEW 8.2.Kelly

Kelly,
I'd be interested in checking out your VIs, but I only go up to LV8.0. Any chance that you could save to 8 and post them?
Thanks.

--------------------
Jim



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
normandinf
post Jul 11 2008, 07:20 PM
Post #5


Extremely Active
****

Premium Member
Posts: 322
Joined: 18-January 08
From: Montréal, Canada
Member No.: 10515
Using LabVIEW Since:2000
LV:8.6 ,8.5 ,.
ca_quebec Canada Nothing Selected


Attached File  Disable_Enable_Hide_Show_v80.zip ( 116.58K ) Number of downloads: 69




Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
kbersch
post Jul 11 2008, 07:57 PM
Post #6


Enough LAVA to be dangerous


Member
Posts: 4
Joined: 23-March 04
From: Mesa, Arizona, USA
Member No.: 323
Using LabVIEW Since:2001
LV:8.2.1 ,6.0.2 ,.
United States Nothing Selected Nothing Selected


I did a little more testing and found a bug in the two support files. Here they are with the fix.
Attached File(s)
Attached File  Get_controls_on_tab.vi ( 44.38K ) Number of downloads: 117
Attached File  Get_controls_in_cluster.vi ( 39.81K ) Number of downloads: 113
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Yair
post Jul 12 2008, 07:38 PM
Post #7


Extwemely Active
*****

Premium Member
Posts: 1674
Joined: 23-January 05
From: Here
Member No.: 1431
Using LabVIEW Since:2003
LV:8.6 ,7.0 ,.
Israel Nothing Selected Nothing Selected


Kelly, relying on control labels is something I generally find potentially dangerous. A more robust method would be using the control references directly. You can see a quick example here (in 7.1, if memory serves). In actual code, I would probably separate the action from the group input, but it shows the concept well enough.

--------------------
More than meets the eye...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 8th January 2009 - 09:31 PM