LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Modify Dimmed condition in the Control Settings

Hello:
I am implementing a configuration menu with CVI, which allows placing several COMMANDBUTTON in a DIMMED position, I can do this, but if I close and open the program, the position of the COMMANDBUTTON returns to the initial condition, depending on what is set in the Control Setting in Panel.
Is it possible to modify the Dimmed condition in the Control Settings from the execution of the application?

Cheers

Carlos

 

0 Kudos
Message 1 of 5
(1,244 Views)

I am not sure if I understood you correctly, but you can change whether a control is enabled or dimmed using the function SetCtrlAttribute ( panel_handle, control_id, ATTR_DIMMED, 1 ) for a disabled, dimmed control (and 0 for enabling it)

 

Hope it helps

0 Kudos
Message 2 of 5
(1,224 Views)

Maybe see SavepanelState() / RecallPanelState() ?

0 Kudos
Message 3 of 5
(1,208 Views)

Hello Wolfgang, thank you very much for your answer, but the use of SetCtrlAttribute, I already have it implemented, what I need is to be able to permanently store the changes made in the COMMANDBUTTON.

Cheers
Carlos

0 Kudos
Message 4 of 5
(1,190 Views)

Hello Gdargaud, thank you very much for your answer, your proposal to use the SavepanelState() / RecallPanelState() functions is very interesting. I didn't know them.

 

After reading the help of these functions, I have the great doubt as I list all the COMMANDBUTTON of the Panel and its DIMMED condition. Do you have an example of how to use these functions?

 

int SavePanelState (int panelHandle, char filename[], int stateIndex);

Charles

0 Kudos
Message 5 of 5
(1,188 Views)