Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Simple Edit Control

SftMask/OCX can be used as a simple edit control. While most features are available, the control is used as a single line edit control replacement without Mask. By setting the Mask property to an empty string, the edit control will accept any data entered up to the maximum number of characters defined using MaxLength.

All other features are still available, such as autocomplete, built-in caption, hit testing, OLE Drag & Drop, formatting features, etc., making it a much more powerful edit control than the standard edit control provided by most development tools.

Samples

Single Line Edit Control:

This example allows entry of up to 80 characters.

Private Sub Form_Load()
    SftMask1.Caption.SizePercent = 33
    SftMask1.Caption.Text = "&Label"
    SftMask1.PromptUnderline = False
    SftMask1.Mask = ""
    SftMask1.Font.Bold = True
    SftMask1.MaxLength = 80
End Sub

Files/Directories:

This example allows entry of a file/directory name. Hit the down arrow key to display a list of files or start typing a file name.

Private Sub Form_Load()
 SftMask1.Caption.Text = "Filename:"
 SftMask1.AutoComplete.Contents = contentsSftMaskFilesDirs
 SftMask1.AutoComplete.DefaultDirectory = "C:\"
 SftMask1.AutoComplete.Refresh ' show the list
End Sub

Password:

This example allows entry of a password (max. 16 characters). The "*" character is displayed instead of the actual data entered.

Private Sub Form_Load()
 SftMask1.Caption.SizePercent = 33
 SftMask1.Caption.Text = "&Password"
 SftMask1.PromptUnderline = False
 SftMask1.Mask = ""
 SftMask1.PswdChar = "*"
 SftMask1.MaxLength = 16
End Sub

Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.