AdvancedHMI Software
General Category => Support Questions => Topic started by: larryhts on August 09, 2018, 04:13:14 PM
-
Hi. Using Ver 339yBeta12 On the main form on any of the BasicLabel’s when I double click on them I thought it would take me to the items click event in the code. It doesn’t it just stays on the form??????
-
If you check the code of the BasicLabel, you will see that the DefaultEvent is set to no event:
<System.ComponentModel.DefaultEvent("")>
Public Class BasicLabel
Inherits System.Windows.Forms.Label
So just change it to Click event:
<System.ComponentModel.DefaultEvent("Click")>
Public Class BasicLabel
Inherits System.Windows.Forms.Label
Then the double-click should work.
Just be aware of the code that already exists for the KeypadPopUp:
'***********************************************************
'* If the label is clicked, pop up a keypad for data entry
'***********************************************************
Protected Overrides Sub OnClick(e As System.EventArgs)
MyBase.OnClick(e)
If m_PLCAddressKeypad IsNot Nothing AndAlso (String.Compare(m_PLCAddressKeypad, "") <> 0) And Enabled Then
ActivateKeypad()
End If
End Sub
-
This is by design. The majority of users coming from another HMI package will by habit double click a control to get to the properties. I have noticed on many occasions their code will have a large number of empty event handlers. In some rare cases, once they are taken to the code page they do not know what to do. To avoid these issues, I have decided to begin removing default event handlers.
-
Thanks Archie, Works fine now.
Best support in the industry.................