LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

checkerboard dimming

Solved!
Go to solution

I am having a problem with setting the attribute checkerboard dimming. I am using CVI 9 and build my panels and controls programmatically. So in keeping up with the latest changes in CVI I am trying to add this additional attribute to my routines that are building all my various controls.

 

However, calling SetCtrlAttribute ( panel_handle, control_id, ATTR_USE_CHECKERBOARD_DIMMING, attribute_value )

results in the error 'the attribute is not valid'. Interestingly, for a panel with 4 controls (button, ring, numeric, numeric color), I receive 3 errors...

As implied by the help this is supposed to be an attribute that can (and has to) be set for any individual control? I remember some discussion in this forum that this was supposed to be a system wide attribute, but probably I got confused.

 

Beause it is an attribute for most controls, I would expect it to work on a per control basis. Somehow, in my case, it does not. This is how my code looks like:

NewCheckBoxControl

SetControlSize

SetControlOnColor

...

SetControlDimmedMode

SetControlTabPosition

SetControlCheckerboardDimming

  

Any ideas? I tried playing with the sequence of the calls, but it didn't help.

 

Thanks, Wolfgang

0 Kudos
Message 1 of 3
(3,507 Views)
Solution
Accepted by topic author Wolfgang

Hi Wolfgang,

 

I apologize for this, but there was a bug in the 9.0 documentation that suggested that ATTR_CHECKERBOARD_DIMMING was a control attribute. It's really a system attribute.

 

You should be receiving a CVI update soon that has this corrected. In the meanwhile, just ignore the documentation and use it with SetSystemAttribute instead. You should set this option globally before loading or creating your controls. Another change related to this attribute that has been made since 9.0 is to have this option also prevent text from being etched (which is the default behavior when dimming controls)

 

Luis

0 Kudos
Message 2 of 3
(3,488 Views)

Thanks!

 

So the correct usage is SetSystemAttribute ( ATTR_USE_CHECKERBOARD_DIMMING,...) and indeed this works as expected 🙂

 

 

0 Kudos
Message 3 of 3
(3,472 Views)