Author Topic: Numeric entry field with a mask?  (Read 120 times)

Numeric entry field with a mask?
« on: September 11, 2018, 09:24:52 PM »
Hi Fellippe,

Is it possible to have a mask within a numeric entry field that also has minimum and maximum value controls ?

Further, would it be possible to add a control such as Integer or Float (i.e. if you set a control to integer, you just can't enter a float)?

In the same way, could it be possible to add controls to limit the character entered within a selected set of characters (i.e. avoiding the space, the point or the comma, the quote, or whatever set of characters you allow such as only Y or N, etc.) ?

As a matter of fact, a single entry filed for both text and number would be fine when having all the options (mask, minimum and maximum, int or float, limited character set).

What do you think ?

Cheers.
Fifi
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Numeric entry field with a mask?
« Reply #1 on: September 11, 2018, 10:26:14 PM »
Hi Fifi,

None of that is possible in the current version of InForm. You can have a masked input text field which is designed for pre-formatted numbers like phone numbers and you can have a numeric-only input control that can have minimum/maximum values validated by InForm itself.

With the current implementation it is up to the user to validate input in other forms, which would ideally be done in the TextChanged event (or, alternatively, in the KeyPress event).

Fellippe.