Announcement

Collapse
No announcement yet.

Change Input Mask via script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change Input Mask via script

    Is it possible to change the input mask of an edit field via a script?

    That property is not listed in the help file. Basically what I want to do is changed the mask as characters are entered because we have two ranges of serial numbers. The format is either ??????-????????-????? or ??????-?????????-?????. The first range starts with 10 and has 8 digits in the second block and the second range starts with 15 and has 9 digits in the second block.

    Thanks for any assistance.
    Ady.

  • #2
    No, you cannot set the mask at runtime. You can have two edit fields with different masks, and leave only one visible on the dialog. Once the format entered into the edit field does not match the expected format, hide the current edit field, and show the other field with the other format, copying the serial entered so far. I have attached a sample project which you build and run to see if this is something you could use or adapt. Check the On Ctrl Message event script of the Custom Screen for the details.

    Ulrich
    Attached Files

    Comment


    • #3
      Thanks Ulrich, I will have a play.

      Comment

      Working...
      X