Author Topic: Question about using BasicLabels  (Read 960 times)

opmal7

  • Newbie
  • *
  • Posts: 19
    • View Profile
Question about using BasicLabels
« on: August 03, 2016, 02:06:16 PM »
I'm using a touchscreen for my HMI, with no keyboard, and the BasicLabel has been great for having user's enter values because of the pop-up keypad.

On one of the screens, I need to add an entry field for the user to enter a decimal number.  This value is not going to be written to the PLC directly, but will need to go through a few programming steps and formatting changes before being sent to the PLC.  Normally, I would just use a regular textbox from the Windows common controls, but that doesn't have a popup keypad when the user clicks on the field.  I tried adding a BasicLabel from the AdvancedHMI controls, but nothing happens when I click on it.

Is that because I don't have anything in the PLCAddress Properties?

Do I need to have a PLC Address entered, in order for the keypad to pop up?

Is there a simple way to have the AdvancedHMI keypad pop up when the user click's on a regular textbox from the common controls?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Question about using BasicLabels
« Reply #1 on: August 03, 2016, 05:08:35 PM »
You can make use of the built-in keypad like this:

- Add a Label from the All Windows Forms group in the Toolbox
- Double click the label to get back to the code
- Add this code:
Code: [Select]
        Dim kpd As New MfgControl.AdvancedHMI.Controls.Keypad()
        If kpd.ShowDialog = Windows.Forms.DialogResult.OK Then
            Label1.Text = kpd.Value
        End If

opmal7

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Question about using BasicLabels
« Reply #2 on: August 04, 2016, 12:13:42 PM »
That worked.  Thanks Archie!