Author Topic: How to catch events with controls  (Read 1481 times)

danjogarrison

  • Newbie
  • *
  • Posts: 2
    • View Profile
How to catch events with controls
« on: July 27, 2015, 01:23:42 PM »
In version 3.56 and below I had modified the code inside of 3 or 4 of the Advanced HMI controls so that they would call a subroutine which then save what had changed to a MySQL data base.

With the latest version since the main program that the user creates has been separated into it's own project "AdvancedHMI" leving the controls in "AdvancedHMIControls" this method no longer works.

Is there a way that when some one changes the value in an AdvancedBasicLabel or click on one of the buttons on the ThreeButtonPLC that it throws an event that I can use to do my logging to the data base?

PS: Thanks Archie for a wonderful program.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: How to catch events with controls
« Reply #1 on: July 27, 2015, 02:10:30 PM »
- Select a BasicLabel that is on the form
- Go to the Properties Windows and click the lightening bolt icon
- Scroll down to ValueChanged and double click

That will take you to an event handler that will fire every time the value changes in the BasicLabel.

danjogarrison

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to catch events with controls
« Reply #2 on: July 27, 2015, 04:47:32 PM »
Okay, I was over looking the one on the Basic label. But I'm in need of something similar on the Basic Button and the Three Button PLC.

Thanks for the response

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: How to catch events with controls
« Reply #3 on: July 27, 2015, 06:20:07 PM »
For the BasicButton you can capture with the TextChanged or BackColorChanged events.