Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ColorableItems Object

Visual Studio .NET 2003

Represents the portions of an item that can be colored, such as the foreground, background, and so forth.


[Visual Basic .NET]
Public Interface ColorableItems
    Inherits IDispatch
[Visual Basic 6]
Class ColorableItems
interface ColorableItems : IDispatch
public interface ColorableItems : IDispatch
[JScript .NET]
public interface ColorableItems extends IDispatch


ColorableItems objects are contained in the FontsAndColorsItems collection.


Namespace: EnvDTE

File: dte.olb


This example lists all of the available colorable items followed by their foreground font index values.

Sub ColorableItemsExample()
   Dim props As EnvDTE.Properties
   props = DTE.Properties("FontsAndColors", "TextEditor")
   Dim prop As EnvDTE.Property = props.Item("FontsAndColorsItems")
   Dim clritems As EnvDTE.FontsAndColorsItems = prop.Object
   Dim clritem As EnvDTE.ColorableItems
   Dim ClrList As String
   For Each clritem In clritems
      ClrList += clritem.Name + " (" + clritem.Foreground.ToString() + ")"
      ClrList += Chr(13) & Chr(10)
End Sub

See Also

Properties, Methods, and Events | FontsAndColorsItems Collection

© 2015 Microsoft