Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Contents Property, SftMaskAutoComplete Object

Defines the type of data shown in the autocomplete window.

Syntax

Get

VB.NETStyle = object.Contents As SftMaskAutoCompleteContentsConstants
VBStyle = object.Contents As SftMaskAutoCompleteContentsConstants
C#.NETSftMaskAutoCompleteContentsConstants Style = object.Contents;
VC++enum SftMaskAutoCompleteContentsConstants Style = object->Contents;
enum SftMaskAutoCompleteContentsConstants Style = object->GetContents();
CHRESULT object->get_Contents(enum SftMaskAutoCompleteContentsConstants* Style);

Put

VB.NETobject.Contents = Style As SftMaskAutoCompleteContentsConstants
VBobject.Contents = Style As SftMaskAutoCompleteContentsConstants
C#.NETSftMaskAutoCompleteContentsConstants object.Contents = Style;
VC++enum SftMaskAutoCompleteContentsConstants object->Contents = Style;
void object->PutContents(enum SftMaskAutoCompleteContentsConstants Style);
CHRESULT object->put_Contents(enum SftMaskAutoCompleteContentsConstants Style);

object

A SftMaskAutoComplete object.

Style

Defines the type of data shown in the autocomplete window.

NameValueDescription
contentsSftMaskText0Text - Text as entered by the user.
contentsSftMaskFiles1Files Only - Files found in the directory DefaultDirectory or matching the current path entered by the user.
contentsSftMaskDirs2Directories Only - Directories found in the directory DefaultDirectory or matching the current path entered by the user.
contentsSftMaskFilesDirs3Files & Directories - Files and directories found in the directory DefaultDirectory or matching the current path entered by the user.

Comments

The Contents property defines the type of data shown in the autocomplete window.

When selecting contentsSftMaskText, text as entered in the control is saved at the location defined by the File property and subsequently displayed, based on the current text entered by the user (and displayed based on the Mode property).

When selecting contentsSftMaskFiles, contentsSftMaskDirs or contentsSftMaskFilesDirs, the autocomplete information displays possible filenames and directories, based on files and directories found in the directory defined using the AutoComplete.DefaultDirectory property or using the partial path entered in the edit control. The selected file or directory is not saved at the location defined by the AutoComplete.File property. The AutoComplete.File property is not required when autocomplete is used display files and directories.

Examples

VB.NET

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    AxSftMask1.Caption.SizePercent = 33
    AxSftMask1.Caption.Text = "&Filename:"
    AxSftMask1.Mask = ""
    AxSftMask1.MaxLength = 300
    AxSftMask1.PromptUnderline = False
    AxSftMask1.AutoComplete.Contents = SftMaskAutoCompleteContentsConstants.contentsSftMaskFilesDirs
    AxSftMask1.AutoComplete.DefaultDirectory = "C:\"
    AxSftMask1.OLEDragMode = SftMaskOLEDragModeConstants.OLEDragSftMaskManual
End Sub

Private Sub AxAxSftMask1_DragStarting(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_DragStartingEvent) Handles AxSftMask1.DragStarting
    If AxSftMask1.SelLength <> 0 Then
        AxSftMask1.OLEDrag()
    End If
End Sub

VB6

Private Sub Form_Load()
    SftMask1.Caption.SizePercent = 33
    SftMask1.Caption.Text = "&Filename:"
    SftMask1.Mask = ""
    SftMask1.MaxLength = 300
    SftMask1.PromptUnderline = False
    SftMask1.AutoComplete.Contents = contentsSftMaskFilesDirs
    SftMask1.AutoComplete.DefaultDirectory = "C:\"
    SftMask1.OLEDragMode = OLEDragSftMaskManual
End Sub

Private Sub SftMask1_DragStarting(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
    If SftMask1.SelLength <> 0 Then
        SftMask1.OLEDrag
    End If
End Sub

C#

private void Form1_Load(object sender, System.EventArgs e)
{
    axSftMask1.Caption.SizePercent = 33;
    axSftMask1.Caption.Text = "&Filename:";
    axSftMask1.Mask = "";
    axSftMask1.MaxLength = 300;
    axSftMask1.PromptUnderline = false;
    axSftMask1.AutoComplete.Contents = SftMaskAutoCompleteContentsConstants.contentsSftMaskFilesDirs;
    axSftMask1.AutoComplete.DefaultDirectory = @"C:\";
    axSftMask1.OLEDragMode = SftMaskOLEDragModeConstants.OLEDragSftMaskManual;
}

private void axSftMask1_DragStarting(object sender, AxSftMaskLib70._ISftMaskEvents_DragStartingEvent e)
{
    if (axSftMask1.SelLength != 0) {
        axSftMask1.OLEDrag();

C++

    m_pMask1 = m_Mask1.GetControlUnknown();
    _ASSERT(m_pMask1 != NULL);

    m_pMask1->Caption->SizePercent = 33;
    m_pMask1->Caption->Text = _T("&Filename:");
    m_pMask1->Mask = _T("");
    m_pMask1->MaxLength = 300;
    m_pMask1->PromptUnderline = VARIANT_FALSE;
    m_pMask1->AutoComplete->Contents = contentsSftMaskFilesDirs;
    m_pMask1->AutoComplete->DefaultDirectory = _T("C:\\");
    m_pMask1->OLEDragMode = OLEDragSftMaskManual;

    return TRUE;
}

void CProject1Dlg::OnDragStartingSftMask1(short Button, short Shift, float x, float y)

See Also SftMaskAutoComplete Object | Object Hierarchy


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