更新:2007 年 11 月
此对话框包括用于设置已注册为在“字体和可着色项”对话框中出现的工具窗口的字体和颜色的选项。这些窗口以这种方式而不是以从 DTE.Properties("Environment", "FontsAndColors") 访问的属性对话框为模型。这样可以支持可着色项的组的动态性,而可着色项会随着在系统中安装或卸载 Visual Studio 软件包而变化。
下面一节演示一个已注册窗口类型的示例以及您将看到各个窗口的哪些属性。
文本编辑器
DTE.Properties("FontsAndColors", "TextEditor")
- 或 -
DTE.Properties("FontsAndColors", "<SomeRegisteredWindowOrEditor>")
其中的 <SomeRegisteredWindowOrEditor> 是备用代码编辑器的名称。
属性项名称 |
值 |
说明 |
---|---|---|
FontFamily |
Get/Set (String) |
要使用的字体名称,如“Courier New”。 |
FontCharacterSet |
Get/Set (vsFontCharSet) |
vsFontCharSet 值,指定要使用的字符集类型,如 Hebrew 或 Russian。 |
FontSize |
Get/Set (Short) |
要使用的字体大小(以磅计)。例如,10 或 12。 |
FontsAndColorsItems |
Get (FontsAndColorsItems) |
FontsAndColorsItems 集合包含 ColorableItems 对象,并具有只读属性 Name 以及读/写属性 Foreground (OLE.Color)、Background (OLE.Color) 和 Bold (Boolean)。 |