LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CTRLARRAY SetCtrlAttribute function issue

Solved!
Go to solution

I have multiple control types in a ctrlarray (textbox, leds, strings, buttons...).  I am trying to enable/disable them using a check box and the SetCtrlAttribute function.  I get the resource ID

TESTBED_1=GetCtrlArrayFromResourceID (panelHandle, CTRLARRAY_2);      

then am trying to DIM all items in the array using

SetCtrlAttribute(PANEL,TESTBED_1,ATTR_DIMMED,1);

it does not function?  can this be down or do I need to DIM them individually since they are different ctrl types?

0 Kudos
Message 1 of 3
(2,304 Views)
Solution
Accepted by topic author Joncombat

You need to use SetCtrlArrayAttribute to set an attribute on an array of controls, not SetCtrlAttribute, which is used only with single controls.

 

One other thing... you need to pass the same panel handle to SetCtrlArrayAttribute that you pass to GetCtrlArrayFromResourceID (in your code snippet that's "panelHandle", not "PANEL").

 

Luis

Message 2 of 3
(2,274 Views)

That did it!  Thank you!

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