LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with GetCtrlAttribute

Hallo

I want to dim checkboxes when clicking on one checkbox and disable dimmed when clicking again.

part of program:

...
if (GetCtrlAttribute(panelHandle, PANEL_CHECKBOX, ATTR_DIMMED, ??????))
...

what do I have to put at the place of the question mark?
error: "expected pointer to void"

thx
Florian
0 Kudos
Message 1 of 3
(4,038 Views)
Hi Greber,

In the callback for the driving check box (the one that determine the state of the others) put these lines:


int sts;

GetCtrlVal (panel, control, &sts); // Retrieve the state of the checkbox 0:unchecked - 1:checked
SetInputMode (panel, PANEL_CHECKBOX1, !sts);
SetInputMode (panel, PANEL_CHECKBOX2, !sts);
...

This way, when the first checkbox is checked, the others are dimmed, while are active again when the checkbox is cleared.

As an alternative to SetInputMode you can use this statement:
SetCtrlAttribute (panel, PANEL_CHECKBOX2, ATTR_DIMMED, !sts);

Regards
Roberto

Message Edited by Roberto Bozzolo on 05-23-2005 11:06 AM



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(4,038 Views)
thx it helped very much.
0 Kudos
Message 3 of 3
(4,028 Views)