AdvancedHMI Software

General Category => Support Questions => Topic started by: opmal7 on August 03, 2016, 02:06:16 PM

Title: Question about using BasicLabels
Post by: opmal7 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?
Title: Re: Question about using BasicLabels
Post by: Archie 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
Title: Re: Question about using BasicLabels
Post by: opmal7 on August 04, 2016, 12:13:42 PM
That worked.  Thanks Archie!