AdvancedHMI Software
General Category => Support Questions => Topic started by: Arvanoss on February 26, 2024, 08:02:15 AM
-
Good Morning Everyone,
I have a working project that the operators are asking for a change.
I have several Basic Buttons that are Enabled and Disabled based on the machine condition. The operators would like the Disabled state to be a different color as they are having trouble determining if the button is Disabled.
Is there some code I can add to the button to change the color when Disabled??
Thanks
-
You can use the PLCAddressAhighlight property to change the color. Put the same address as used in PLCAddressEnabled
-
Thanks Archie,
I am using the PLCAddressHighlightX and PLCAddressSelectTextAlternate to display reactions to the button press, these are basic Jog and Run buttons.
Is there an option/method to add a "Enable Forecolor" and "Enable Backcolor"?
Thanks
-
- In Solution Explorer expand down AdvancedHMIControls
- Exapand down the Controls folder
- Right Click BasicButton.vb and select View Code
- Go down to about line 405, just below #Region "Events"
- Add this code
Protected Overrides Sub OnEnabledChanged(e As EventArgs)
MyBase.OnEnabledChanged(e)
If Not Me.Enabled Then
Me.BackColor = Color.Black
End If
End Sub
-
Thank you Archie that works very well.