Masked textbox validating event

29 Mar

The Text Box control enables a user to type text into an app. For an example of this, see Scenario 2 of the Context Menu sample. You can get or set the selected text in a Text Box using the Selected Text property.

It's typically used to capture a single line of text, but can be configured to capture multiple lines of text. Use the Selection Start and Selection Length properties, and the Select and Select All methods, to manipulate the text selection.

This is a masked input plugin for the j Query javascript library.

It allows a user to more easily enter fixed width input where you would like them to enter the data in a certain format (dates,phone numbers, etc).

Is there a way to set an input mask on a text box in Primal Forms?

From Googling I found reference to a Masked Text Box Windows Forms control, but I don't see it as an option in the toolbox or fields related to setting an input mask when poking through the properties of the textbox and richtextbox controls.

It took me a bit to figure out I needed to export to .ps1 first, then open the .ps1 file in Primal Forms and make the changes there, then after testing/previewing package it back out to a file. Masked Text Box, and then under the region generated form code section (towards the bottom of the script) adding the additional properties, like $blahblah.

I guess another feature request would be a view option to toggle viewing the form/region generated code within the script editor. Mask = "CC: CC: CC: CC: CC: CC" (a basic one for my need to make sure MAC addresses are entered in colon separated format).

Mask literals will be automatically entered for the user as they type and will not be able to be removed by the user.

If it helps anyone else who comes across this thread, converting a Text Box to a Masked Text Box was as simple as opening the exported .ps1 file and editing the region generated form object (top section of the script) from $blahblah = New-Object System. Simple create a place holder control that has the same location and dimensions you want the Masked Text Box control to have.

Don't forget to set the placeholder's "Visible" property to "false" otherwise it will appear on the form.

In this article, I will discuss how to create a Masked Text Box control in Windows Forms at design-time as well as run-time.

After that, I will continue discussing various properties and methods available for the Masked Text Box control.