LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug report - if you disable a tab and then write to a control inside that tab, it appears as if it's enabled

LV 2009. I haven't checked if this happens in earlier versions.

 

If you change the Disabled property of a tab control to Disabled and Grayed and then write a value to a control which is inside the tab, the control changes its appearance to look as if it's enabled.

 

The workaround I've found was to defer the panel updates before disabling the tab and undefer after writing the values.


___________________
Try to take over the world!
Message 1 of 9
(4,272 Views)

I made a screenshot earlier, so I might as well post it:

 

Disabled.PNG


___________________
Try to take over the world!
Message 2 of 9
(4,260 Views)
It's in 8.6 too
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 3 of 9
(4,258 Views)
NI people, is there a CAR on this?

___________________
Try to take over the world!
0 Kudos
Message 4 of 9
(4,146 Views)

Hi All,

 

First off I want to apologize for the delayed response.  This has been reported to R&D (CAR #195503) for further investigation.  I managed to come up with another work around that I hope you will find useful.  Basically, you can use VI Server to access the references, and therefore the properties and methods, of all of the controls on a tab control.  By taking advantage of this, you can easily set each control on a tab control to be disabled by itself.  I have modified the code that you sent to demonstrate this.  Please have a look at this and let me know if it will be an acceptible workaround while the issue that you reported is being investigated.  I have also attached a VI Snippet of the extra piece of code that I wrote to handle the VI server operations.  Hopefully this will help anyone trying to integrate this solution. Thanks for your posts!

 

disableBD.png

 

 Disable snippet.png

Wes Pierce
Principal Engineer
Pierce Controls
Download All
0 Kudos
Message 5 of 9
(4,107 Views)
I personally feel that the workaround I posted originally (defering updates) is better (the code is simpler, especially if you already have a subVI which does the defering), but there are certainly cases where controlling the disabling would be more appropriate. Of course, in those cases I would usually select the controls manually, since it wouldn't be all the controls.

___________________
Try to take over the world!
0 Kudos
Message 6 of 9
(4,082 Views)
Does it react the same way with a local variable and property node?
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 9
(4,069 Views)

Bug confirmed in LV 8.5.1. Smiley Happy

 


Yamaeda wrote:
Does it react the same way with a local variable and property node?

 

It reacts the same way with locals, but slightly different with property nodes.

 

I mean there are 2 Disabled & Greyed out states for a Tab, one for the whole Tab itself & the other for the particular page(s). When using the property nodes, it turns to be enabled only when the Tab itself is not Disabled & Greyed Out irrespective of the Disabled stste of the Page Enabled State property.

 

I tested with these properties configured only thro' the shortcut menu option & NOT thro' property nodes.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 8 of 9
(4,055 Views)

Hi tst,

 

Deferring front panel updates does require less code, but the difference is that with that method, only the UI is affected.  The controls are not actually disabled, as with the other work around.  Ultimately, everyone should evaluate the needs of their own application and choose which method works the best.  However, it is useful to understand what each method is actually doing.

 

Also, I'd like to point out that in the example workaround that I posted, I chose to disable all controls.  However, it would be fairly simple to implement some code that would allow the user to choose which controls were enabled or disabled.

 

Thanks for your comments!

 

Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 9 of 9
(3,998 Views)