SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the control's formatted display text.
Get
VB.NET | String = object.FormattedText As String |
VB | String = object.FormattedText As String |
C#.NET | string String = object.FormattedText; |
VC++ | _bstr_t String = object->FormattedText; _bstr_t String = object->GetFormattedText(); |
C | HRESULT object->get_FormattedText(BSTR* String); |
Put
VB.NET | object.FormattedText = String As String |
VB | object.FormattedText = String As String |
C#.NET | string object.FormattedText = String; |
VC++ | _bstr_t object->FormattedText = String; void object->PutFormattedText(_bstr_t String); |
C | HRESULT object->put_FormattedText(BSTR String); |
object
String
Defines the text to be displayed when the control does not have the input focus. If this is an empty string, the control's contents are displayed.
The FormattedText property defines the control's formatted display text.
The FormattedText property contents are displayed in the edit control when the control does not have the input focus. This could be used to display specially formatted text while the user is not entering text.
If the control does not have the input focus, the FormattedText property contents are displayed. If the mouse cursor moves over the edit control, the regular edit control contents are displayed momentarily.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxSftMask1.Caption.SizePercent = 33 AxSftMask1.Caption.Text = "&Text:" AxSftMask1.Mask = "\(###\) ###\-####" AxSftMask1.Alignment = SftMaskAlignConstants.alignSftMaskLeft AxSftMask1.BackColorInvalid = Color.Red AxSftMask1.ForeColorInvalid = Color.White AxSftMask1.FormattedText = "Please enter a telephone number" End Sub Private Sub AxSftMask1_Change(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftMask1.Change If AxSftMask1.Contents.Valid Then MsgBox("This is a valid phone number.") Else If AxSftMask1.Contents.Empty Then AxSftMask1.FormattedText = "Please enter a telephone number"
Private Sub Form_Load() With SftMask1.Direct .Caption.SizePercent = 33 .Caption.Text = "&Text:" .Mask = "\(###\) ###\-####" .Alignment = alignSftMaskLeft .BackColorInvalid = vbRed .ForeColorInvalid = vbWhite SftMask1.FormattedText = "Please enter a telephone number" End With End Sub Private Sub SftMask1_Change() If SftMask1.Contents.Valid Then MsgBox ("This is a valid phone number.") Else
private void Form1_Load(object sender, System.EventArgs e) { axSftMask1.Caption.SizePercent = 33; axSftMask1.Caption.Text = "&Text:"; axSftMask1.Mask = @"\(###\) ###\-####"; axSftMask1.Alignment = SftMaskAlignConstants.alignSftMaskLeft; axSftMask1.BackColorInvalid = Color.Red; axSftMask1.ForeColorInvalid = Color.White; axSftMask1.FormattedText = "Please enter a telephone number"; } private void axSftMask1_Change(object sender, System.EventArgs e) { if (axSftMask1.Contents.Valid) { MessageBox.Show("This is a valid phone number."); } else {
_ASSERT(m_pMask1 != NULL); m_pMask1->Caption->SizePercent = 33; m_pMask1->Caption->Text = _T("&Text:"); m_pMask1->Mask = _T("\\(###\\) ###\\-####"); m_pMask1->Alignment = alignSftMaskLeft; m_pMask1->BackColorInvalid = RGB(255,0,0); m_pMask1->ForeColorInvalid = RGB(255,255,255); m_pMask1->FormattedText = _T("Please enter a telephone number"); return TRUE; } void CProject1Dlg::OnChangeSftMask1() { if (m_pMask1->Contents->Valid != VARIANT_FALSE) {
See Also SftMask Object | Object Hierarchy