Solid Edge FrameworkSupport Type Library
Color Property
Description
Sets or returns the color of the referenced text.
Property type
Read-write property
Syntax
Visual Basic
Public Property Color As Long
Remarks
The color is stored as a long integer and is created with the RGB function (red, green, and blue color intensities) or as an integer between 0 and 16 that represents standard colors. The TextEdit object always has an insert index or a selection active; setting any property on the TextEdit object applies to the current selection (if 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
            ' Set orange color
            objTextEdit.Color = 33023

        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.