LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Kosta

Easy Way to Enable and Disable Controls with VI Server

Status: New

 

I have written and read code that sets Disabled property many times, and it always looks the same.

Enabled or Disabled and Grayed Out.jpg

 

 

 

I wish I cold say the same thing with two nodes and one wire instead of five nodes and four wires. This is what I have in mind.

EZ Enabled.jpg

 

 

 

I am not attached to the name of the proposed property. I am partial to the Boolean data type and I prefer to go with positive language (enabled as opposed to disabled).

 

One alternative for naming is to use plain "Enabled" for the proposed property, and change the name of the old property to "Disabled Mode" or "Enabled Mode".

 

 

 

 

Kosta
2 Comments
AristosQueue (NI)
NI Employee (retired)

Setting Enabled? to false is ambiguous because there are two false states. It definitely wouldn't go to disabled AND grayed. The "and" is additional. Avoiding that ambiguity is the whole reason for the current API.

wiebe@CARYA
Knight of NI

Related (and perhaps a workaround):

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Property-Node-Disabled-Constant-Reshape/idi-p/1648264

 

I agree that the enabled\disabled\disabled and greyed out is a hassle.

 

I personally woudn't mind a separete "Disabled" and a "Grayed out (if disabled)" property.

 

These could live next to the exsisting method, where setting "Disabled and Grayed out" would set both to true. Setting it to "Enabled" would keep the "Grayed out (if disabled)" status true, and setting "Disabled" would set "Grayed out (if disabled)" to false.