Author Topic: Numeric Keypad  (Read 1175 times)

blaisbb

  • Newbie
  • *
  • Posts: 6
    • View Profile
Numeric Keypad
« on: February 28, 2019, 08:53:29 AM »
I am trying to write a number in a textbox and would like to have a dash.
ex: 92000-001
I noticed that the MfgControl.AdvancedHMI does not have a dash but that the keypad that comes up in the application when a value on a basic label needs to be changed does have a dash.Can I have that basic label keypad come up for a standard textbox.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Numeric Keypad
« Reply #1 on: February 28, 2019, 09:33:21 AM »
Keypad can only do numeric values. Your number would actually be a string. You would need to set KeypadAlphanumeric  to true. Or use the MfgControl.AdvancedHMI.Controls.AlphaKeyboard

blaisbb

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Numeric Keypad
« Reply #2 on: March 06, 2019, 08:53:23 AM »
I have set up the textbox to show the MfgControl.AdvancedHMI.Controls.AlphaKeyboard on click. It then returns the typed in value to the text box. If I click on the textbox with text already there, the MfgControl.AdvancedHMI.Controls.AlphaKeyboard clears the data and I have to retype the entire number. Can I have the MfgControl.AdvancedHMI.Controls.AlphaKeyboard show the current textbox value for editing?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Numeric Keypad
« Reply #3 on: March 06, 2019, 09:06:58 AM »
I have set up the textbox to show the MfgControl.AdvancedHMI.Controls.AlphaKeyboard on click. It then returns the typed in value to the text box. If I click on the textbox with text already there, the MfgControl.AdvancedHMI.Controls.AlphaKeyboard clears the data and I have to retype the entire number. Can I have the MfgControl.AdvancedHMI.Controls.AlphaKeyboard show the current textbox value for editing?
Before showing the keyboard, set the value property:
Code: [Select]
        Dim kbd As New MfgControl.AdvancedHMI.Controls.AlphaKeyboard
        kbd.Value = "123"
        kbd.ShowDialog()

blaisbb

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Numeric Keypad
« Reply #4 on: March 06, 2019, 09:21:31 AM »
That's got it working.
Thanks Archie. :)