HeaderPane
Main
Hide
Share Link
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 void Form1_Load(object sender, System.EventArgs e)
{
    axSftMask1.Caption.SizePercent = 33;
    axSftMask1.Caption.Text = "&Label";
    axSftMask1.PromptUnderline = false;
    axSftMask1.Mask = "";
    axSftMask1.Font = new Font(axSftMask1.Font, FontStyle.Bold);
    axSftMask1.MaxLength = 80;
}

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 void Form1_Load(object sender, System.EventArgs e)
{
    axSftMask1.Caption.Text = "Filename:";
    axSftMask1.AutoComplete.Contents = SftMaskAutoCompleteContentsConstants.contentsSftMaskFilesDirs;
    axSftMask1.AutoComplete.DefaultDirectory = @"C:\";
    axSftMask1.AutoComplete.Refresh(); // show the list
}

Password:

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

private void Form1_Load(object sender, System.EventArgs e)
{
    axSftMask1.Caption.SizePercent = 33;
    axSftMask1.Caption.Text = "&Password";
    axSftMask1.PromptUnderline = false;
    axSftMask1.Mask = "";
    axSftMask1.PswdChar = "*";
    axSftMask1.MaxLength = 16;
}

Last Updated 11/15/2026 - (email)
© 2026 Softel vdm, Inc.