HeaderPane
Main
Hide
Share Link
Print

Alignment Property, SftMask Object

Defines the text alignment.

Syntax

Get

C#SftMaskAlignConstants Align = object.Alignment;
VB.NETAlign = object.Alignment As SftMaskAlignConstants
C++enum SftMaskAlignConstants Align = object->Alignment;
enum SftMaskAlignConstants Align = object->GetAlignment();
CHRESULT object->get_Alignment(enum SftMaskAlignConstants* Align);

Put

C#SftMaskAlignConstants object.Alignment = Align;
VB.NETobject.Alignment = Align As SftMaskAlignConstants
C++enum SftMaskAlignConstants object->Alignment = Align;
void object->PutAlignment(enum SftMaskAlignConstants Align);
CHRESULT object->put_Alignment(enum SftMaskAlignConstants Align);

object

A SftMask object.

Align

Defines the text alignment.

AlignValueDescription
alignSftMaskLeft0The text in the edit control is left adjusted.
alignSftMaskCenter1The text in the edit control is left adjusted if the control has the input focus. The text is centered only if the control does not have the input focus.
alignSftMaskRight2The text in the edit control is right adjusted.

Comments

The Alignment property defines the text alignment.

The Alignment property defines the horizontal text alignment of the edit control. It applies to the contents of the edit control (Text and FormattedText properties).

The caption's alignment is defined using the Caption.Alignment property.

Examples

C# View entire sample code

    Font NormFont = new Font("Times New Roman", 12, FontStyle.Regular);
    axSftMask1.Caption.Font = OLECvt.ToIFontDisp(NormFont);

    SftMaskCalculator CalcObj = axSftMask1.Calculator;

    axSftMask1.Caption.SizePercent = 33;
    axSftMask1.Caption.Text = "&Amount:";
    axSftMask1.Mask = "| $C-,8.2";
    axSftMask1.Alignment = SftMaskAlignConstants.alignSftMaskRight;
    axSftMask1.EntrySelect = SftMaskEntrySelectConstants.entrySftMaskSelectEnd;
    axSftMask1.Text = "10";

    CalcObj.Lines = 12;
    CalcObj.FracDigits = 2;
    CalcObj.BackColor = (uint) ColorTranslator.ToOle(SystemColors.Info);
    CalcObj.ForeColor = (uint) ColorTranslator.ToOle(SystemColors.InfoText);

VB.NET View entire sample code

    AxSftMask1.Font = BoldFont
    Dim NormFont As New Font("Times New Roman", 12, FontStyle.Regular)
    AxSftMask1.Caption.Font = OLECvt.ToIFontDisp(NormFont)

    Dim CalcObj As SftMaskCalculator
    AxSftMask1.Caption.SizePercent = 33
    AxSftMask1.Caption.Text = "&Amount:"
    AxSftMask1.Mask = "| $C-,8.2"
    AxSftMask1.Alignment = SftMaskAlignConstants.alignSftMaskRight
    AxSftMask1.EntrySelect = SftMaskEntrySelectConstants.entrySftMaskSelectEnd
    AxSftMask1.Text = 10
    CalcObj = AxSftMask1.Calculator
    CalcObj.Lines = 12
    CalcObj.FracDigits = 2
    CalcObj.BackColor = Convert.ToUInt32(ColorTranslator.ToOle(SystemColors.Info) And &HFFFFFFFF&)
    CalcObj.ForeColor = Convert.ToUInt32(ColorTranslator.ToOle(SystemColors.InfoText) And &HFFFFFFFF&)

C++ View entire sample code

    pFont->put_Size(size);

    ISftMaskCalculatorPtr pCalc;
    pCalc = m_pMask1->Calculator;

    m_pMask1->Caption->SizePercent = 33;
    m_pMask1->Caption->Text = _T("&Amount:");
    m_pMask1->Mask = _T("| $C-,8.2");
    m_pMask1->Alignment = alignSftMaskRight;
    m_pMask1->EntrySelect = entrySftMaskSelectEnd;
    m_pMask1->Text = _T("10");

    pCalc->Lines = 12;
    pCalc->FracDigits = 2;
    pCalc->BackColor = COLOR_INFOBK |0x80000000L;
    pCalc->ForeColor = COLOR_INFOTEXT |0x80000000L;

See Also SftMask Object | Object Hierarchy


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