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.

ColorableItems

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

Remarks

ColorableItems objects are contained in the FontsAndColorsItems collection.

Requirements

Namespace: EnvDTE

File: dte.olb

Example

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)
   Next
   MsgBox(ClrList)
End Sub

See Also

Properties, Methods, and Events | FontsAndColorsItems Collection

Show:
© 2015 Microsoft