更新:2007 年 11 月
這個對話方塊中的選項是用來設定已登錄要顯示在 [字型和可設定色彩的項目] 對話方塊中之工具視窗的字型和色彩。這種視窗的設計方式就是如此,而非使用從 DTE.Properties("Environment", "FontsAndColors") 存取的屬性對話方塊。如此才能支援可設定色彩項目群組的動態本質,從系統安裝或解除安裝 Visual Studio 套件時,這些項目可能會變更。
在下一節中會提供已登錄的視窗類型範例,並且說明在每個視窗中可以看到哪些屬性。
文字編輯器
DTE.Properties("FontsAndColors", "TextEditor")
-或-
DTE.Properties("FontsAndColors", "<SomeRegisteredWindowOrEditor>")
其中的 <SomeRegisteredWindowOrEditor> 是指其他程式碼編輯器的名稱。
屬性項目名稱 |
值 |
描述 |
|---|---|---|
FontFamily |
Get/Set (字串) |
要使用的字型名稱,例如 "Courier New"。 |
FontCharacterSet |
Get/Set (vsFontCharSet) |
vsFontCharSet 值,指定要使用的字元集類型,例如希伯來文或俄文。 |
FontSize |
Get/Set (短整數) |
要使用的字型大小 (點數)。例如 10 或 12。 |
FontsAndColorsItems |
Get (FontsAndColorsItems) |
FontsAndColorsItems 集合包含 ColorableItems 物件,而且具有 Name 這個唯讀屬性,以及 Foreground (OLE.Color)、Background (OLE.Color) 和 Bold (布林值) 等讀取/寫入屬性。 |