LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

About Dimming controls

Hi,

 

I am facing weird behaviors with dimmed attribute of some controls.

 

I am using LabWindows CVI 2009.

 

I have managed colors of my buttons so that the color change according to buttons have focus or not.

If I keep this process, the buttons refuse to get dimmed when main panel is dimmed.

If I remove this process, buttons mainly follow the dimmed attribute value of the main panel...

Does anybody knows if it is normal?

 

Moreover as I said, whithout my buttons color management, most of the buttons follow the main panel dimmed attribute value, but not all of them.

 

Is there a reason why some buttons do not follow the main panel behavior?

 

Thank you for your replies.

Best regards,

0 Kudos
Message 1 of 7
(2,007 Views)

Hello,

what are your panel settings for [Edit Panel][Other attributes][Conform to System Colors] and [Use Windows Visual Styles for Controls] ?

I found out that too often those settings cause style problems. They are much better disallowed.

0 Kudos
Message 2 of 7
(1,972 Views)

Hi,

Thank you for reply.

The 2 options are disabled.

 

FlorentSEFI_0-1670920516631.png

Regards,

0 Kudos
Message 3 of 7
(1,969 Views)

I must admit that I don't fully understand your explanation...

Can you create a minimum sample application that exhibits this behavior so that we can examine it?



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 4 of 7
(1,936 Views)

Hi,

Sorry for late answer.

It seems that I had misunderstood the HMI behavior.

Since the controls in the form turned "faded" once I dimmed the panel, I thought they were dimmed too.

But I was wrong.

Dimming the panel does not automaticaaly dimm the incuded controls.

I solve my issue by manually dimm all the panel controls when dimming the panel.

 

Best regards,

0 Kudos
Message 5 of 7
(1,859 Views)

Dimming a panel disables all the controls therein. I just tested it again. I, too, would like to see a code sample where that is not the case.

 

Related to this, you can also use SetInputMode to disable a control/Panel. I never understood the distinction with ATTR_DIMMED, if someone wants to enlighten me...

0 Kudos
Message 6 of 7
(1,855 Views)

I just use this method to dimm my main panel:

SetPanelAttribute(main_panel,ATTR_DIMMED,1);

 

and I have a callback associated to all my buttons in the main panel:

int CVICALLBACK Panel1_button_cb(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)

 

Once the main panel is dimmed using the previous method, the callback associated to the buttons is called when mouse drags over the buttons.

I think it would not.

 

When the buttons are manually dimmed using ATTR_DIMMED on them directly the callback is not called.

That prove that dimming the main panel in my case does not dimm the controls inside.

 

So It had no choice but adding an explicit individual dimming to each button when dimming my main panel to inhibit that callback.

 

As a reminder I am using CVI 2009 at the moment.

Maybe this as been improved later...

0 Kudos
Message 7 of 7
(1,849 Views)