次の方法で共有


ColorableItems インターフェイス

前景や背景など、色を指定できるアイテムの特定の部分を表します。

名前空間:  EnvDTE
アセンブリ:  EnvDTE (EnvDTE.dll 内)

構文

'宣言
<GuidAttribute("E5D17051-D6E5-4DA7-8B3A-CA888617A5E7")> _
Public Interface ColorableItems
[GuidAttribute("E5D17051-D6E5-4DA7-8B3A-CA888617A5E7")]
public interface ColorableItems
[GuidAttribute(L"E5D17051-D6E5-4DA7-8B3A-CA888617A5E7")]
public interface class ColorableItems
[<GuidAttribute("E5D17051-D6E5-4DA7-8B3A-CA888617A5E7")>]
type ColorableItems =  interface end
public interface ColorableItems

ColorableItems 型で公開されるメンバーは以下のとおりです。

プロパティ

  名前 説明
パブリック プロパティ Background アイテムの背景色を設定または取得します。
パブリック プロパティ Bold アイテムを太字で表示するかどうかを示す値を設定または取得します。
パブリック プロパティ Foreground アイテムの前景色を設定または取得します。
パブリック プロパティ Name ColorableItems オブジェクトの名前を設定または取得します。

このページのトップへ

解説

ColorableItems オブジェクトは、FontsAndColorsItems コレクションに含まれています。

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

参照

関連項目

EnvDTE 名前空間