Author Topic: Mask Property of Textbox  (Read 14431 times)

0 Members and 1 Guest are viewing this topic.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
Mask Property of Textbox
« on: August 29, 2018, 12:51:50 pm »
Is the Mask Array Property of a Textbox clever enough to deal with exponentiation?  If I were to use Mask(TextBox1) = "0.0E00", would the Textbox always display any number in the form 5.1E13 independent of what the user typed or what value was assigned at run time?

Apologies for dumb question (I suggest that you start a New Section titled "Qwerkey's Dumb Questions" - you might have to negotiate a larger block on your server), I always struggled with formatting, and the word "literal" in the Wiki has confused me.

Oops!  I think that this might be an even more dumb question than I first thought.  The thing in a Textbox is a string, not a number.

An anonymous dumb coder.

FellippeHeitor

  • Guest
Re: Mask Property of Textbox
« Reply #1 on: August 29, 2018, 01:24:09 pm »
If you have Mask(TextBox1) = "0.0E00" in your program, InForm will only allow the user to enter numbers in that text field, and they will replace those zeros. The dot and the E will remain in place.

You can see that in action in the editor. As soon as you enter "0.0E00" as mask to a TextBox control, the Text property will be bound to the new format. It'll show "_._E__" and you'll feel how it works.

mask.PNG
« Last Edit: August 29, 2018, 01:26:30 pm by FellippeHeitor »