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 selected text.
Get
| VB.NET | String = object.SelText As String |
| VB | String = object.SelText As String |
| C#.NET | string String = object.SelText; |
| VC++ | _bstr_t String = object->SelText; _bstr_t String = object->GetSelText(); |
| C | HRESULT object->get_SelText(BSTR* String); |
Put
| VB.NET | object.SelText = String As String |
| VB | object.SelText = String As String |
| C#.NET | string object.SelText = String; |
| VC++ | _bstr_t object->SelText = String; void object->PutSelText(_bstr_t String); |
| C | HRESULT object->put_SelText(BSTR String); |
object
String
Defines the selected text.
The SelText property defines the selected text.
The SelText property describes the currently selected text, including any literals based on the ClipMode property. When retrieving the SelText property, the selected text is returned including all literals, as it is displayed.
When setting the SelText property, the specified Text replaces the currently selected text. Based on the ClipMode property, literals may be present. In any case, if characters in the new string Text are not acceptable based on the defined input mask (see Mask property), they are simply ignored. Languages that provide the HRESULT value can test for S_OK (the function was successful), S_FALSE (at least one character was ignored) or an error return value.
When retrieving or setting the SelText property in a Masked Edit control (with Mask), input positions without data are represented by the carriage return (Chr(13)) character. This allows the distinction between unspecified data and specified (but blank) data fields. A simple edit control (without Mask) does not have unspecified positions and never uses the carriage return place holder.
AxSftMask1.OLEDropMode = SftMaskOLEDropModeConstants.OLEDropSftMaskManual
End Sub
Private Sub AxAxSftMask1_OLEDragDrop(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_OLEDragDropEvent) Handles AxSftMask1.OLEDragDrop
Dim S As String
If e.data.GetFormat(SftOLEClipboardConstants.sftCFText) Then
S = e.data.GetData(SftOLEClipboardConstants.sftCFText)
AxSftMask1.SelStart = e.targetChar
AxSftMask1.SelText = S
Else
e.effect = 0 ' vbDropEffectNone
End If
End Sub
Private Sub AxAxSftMask1_OLEDragOver(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_OLEDragOverEvent) Handles AxSftMask1.OLEDragOver
If e.targetChar < 0 Then
SftMask1.OLEDropMode = OLEDropSftMaskManual
End Sub
Private Sub SftMask1_OLEDragDrop(Data As SftMaskLib70.DataObject, TargetChar As Long, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
Dim S As String
If Data.GetFormat(sftCFText) Then
S = Data.GetData(sftCFText)
SftMask1.SelStart = TargetChar
SftMask1.SelText = S
Else
Effect = vbDropEffectNone
End If
End Sub
Private Sub SftMask1_OLEDragOver(Data As SftMaskLib70.DataObject, TargetChar As Long, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As SftMaskLib70.SftMaskOLEDragOverConstants)
If TargetChar < 0 Then} private void axSftMask1_OLEDragDrop(object sender, AxSftMaskLib70._ISftMaskEvents_OLEDragDropEvent e) { string s; if (e.data.GetFormat((short) SftOLEClipboardConstants.sftCFText)) { s = (string) e.data.GetData(SftOLEClipboardConstants.sftCFText); axSftMask1.SelStart = e.targetChar; axSftMask1.SelText = s; } else { e.effect = 0; //vbDropEffectNone } } private void axSftMask1_OLEDragOver(object sender, AxSftMaskLib70._ISftMaskEvents_OLEDragOverEvent e) {
void CProject1Dlg::OnOLEDragDropSftMask1(LPDISPATCH FAR* Data, long FAR* TargetChar, long FAR* Effect, short FAR* Button, short FAR* Shift, float FAR* x, float FAR* y) { IVDMDataObjectPtr pData = *Data; if (pData->GetFormat(sftCFText) != VARIANT_FALSE) { _variant_t data = pData->GetData(_variant_t((long) sftCFText)); data.ChangeType(VT_BSTR); m_pMask1->SelStart = *TargetChar; m_pMask1->SelText = data.bstrVal; } else *Effect = DROPEFFECT_NONE; } void CProject1Dlg::OnOLEDragOverSftMask1(LPDISPATCH FAR* Data, long FAR* TargetChar, long FAR* Effect, short FAR* Button, short FAR* Shift, float FAR* x, float FAR* y, long FAR* State) { IVDMDataObjectPtr pData = *Data;
See Also SftMask Object | Object Hierarchy
