Defines the text alignment.
Get
| C# | SftMaskAlignConstants Align = object.Alignment; |
| VB.NET | Align = object.Alignment As SftMaskAlignConstants |
| C++ | enum SftMaskAlignConstants Align = object->Alignment; enum SftMaskAlignConstants Align = object->GetAlignment(); |
| C | HRESULT object->get_Alignment(enum SftMaskAlignConstants* Align); |
Put
| C# | SftMaskAlignConstants object.Alignment = Align; |
| VB.NET | object.Alignment = Align As SftMaskAlignConstants |
| C++ | enum SftMaskAlignConstants object->Alignment = Align; void object->PutAlignment(enum SftMaskAlignConstants Align); |
| C | HRESULT object->put_Alignment(enum SftMaskAlignConstants Align); |
object
Align
Defines the text alignment.
| Align | Value | Description |
|---|---|---|
| alignSftMaskLeft | 0 | The text in the edit control is left adjusted. |
| alignSftMaskCenter | 1 | The 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. |
| alignSftMaskRight | 2 | The text in the edit control is right adjusted. |
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.
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);
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&)
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