Export (0) Print
Expand All
ID
Top
Expand Minimize

Bold Property

Visual Studio .NET 2003

Sets or returns whether or not the item should appear in bold.

[Visual Basic .NET]
Public Property Bold() As Boolean
[Visual Basic 6]
Property Get Bold() As Boolean
Property Let Bold( _
   ByVal NewValue As Boolean _
) 
[C++]
HRESULT __stdcall get_Bold(
   /* [out, retval] */ VARIANT_BOOL* retVal
);
HRESULT __stdcall put_Bold(
   /* [in] */ VARIANT_BOOL NewValue
);
[C#]
public bool Bold {get; set;}
[JScript .NET]
public function get Bold() : Boolean
public function set Bold(
   NewValue : Boolean
)

Parameters

NewValue
Determines if the item is bold.

Return Value

Returns True if the item is bold, False if not.

Example

The following example lists the foreground, background, and bold values for the first colorable item.

Sub BoldExample()
   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 = clritems.Item(1)
   Dim ClrList As String

   ClrList += "Background color: " & clritem.Background.ToString & vbCr
   ClrList += "Foreground color: " & clritem.Foreground.ToString & vbCr
   ClrList += "Bold?: " & clritem.Bold.ToString
   MsgBox(ClrList)
End Sub

See Also

Applies To: ColorableItems Object | FontsAndColorsItems Collection

Show:
© 2014 Microsoft