Solid Edge FrameworkSupport Type Library
SetSelect Method
Specifies the start of the selection range.
Specifies the end of the selection range.
Specifies the text selection option to be applied. Valid values are members of the TextSelectConstants constant set.
Description
Assigns the selection range start and end values.
Syntax
Visual Basic
Public Sub SetSelect( _
   ByVal Start As Long, _
   ByVal End As Long, _
   ByVal option As TextSelectConstants _
) 
Parameters
Start
Specifies the start of the selection range.
End
Specifies the end of the selection range.
option
ValueDescription
seTextSelectAllSelect all of the text
seTextSelectParagraphSelect a paragraph
seTextSelectRangeSelect a range of characters
seTextSelectWordSelect a word
Specifies the text selection option to be applied. Valid values are members of the TextSelectConstants constant set.
Remarks
The TextEdit object always has an insert index or an active selection. Setting any property on the TextEdit object applies to the current selection, if one is present, or to the text at the current insert index.
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objDraftDocument As SolidEdgeDraft.DraftDocument = Nothing
        Dim objSheet As SolidEdgeDraft.Sheet = Nothing
        Dim objTextBoxs As SolidEdgeFrameworkSupport.TextBoxes = Nothing
        Dim objTextBox As SolidEdgeFrameworkSupport.TextBox = Nothing
        Dim objTextEdit As SolidEdgeFrameworkSupport.TextEdit = Nothing

        Try
            OleMessageFilter.Register()

            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objDraftDocument = objApplication.ActiveDocument
            objSheet = objDraftDocument.ActiveSheet
            objTextBoxs = objSheet.TextBoxes
            objTextBox = objTextBoxs.Add(x1:=0.1, y1:=0.3, z1:=0)
            objTextBox.Text = "Some text"
            objTextEdit = objTextBox.Edit
            objTextEdit.SetSelect(0, 5, SolidEdgeFrameworkSupport.TextSelectConstants.seTextSelectRange)

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub

End Module
See Also

TextEdit Object  | TextEdit Members

Send comments on this topic.