Skip to content

ViewBackColor Property

Description

Gets/Sets the view backcolor for the PropertyGrid. This is the background color of the PropertyGridItems.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property ViewBackColor() As ULong

Remarks

This will only affect the background of normal PropertyGridItems. It will not affect the backcolor of Category items; the LineColor is used as a backcolor for Categories.

Example

Customizable Appearance Sample (Visual Basic). This sample code illustrates how to customize the font and colors of the PropertyGrid.

' Sets the text color of the Help box at the bottom of the PropertyGrid to black  
wndPropertyGrid.HelpForeColor = 0  

' Sets the background color of the Help box at the bottom of the PropertyGrid to Red  
wndPropertyGrid.HelpBackColor = vbRed  

' Sets the line color of the PropertyGrid to white, this is also used to draw the background  
' color of Category PropertyGridItems  
wndPropertyGrid.LineColor = &HFFFFFF  

' Sets the background color of the PropertyGridItems to Blue  
wndPropertyGrid.ViewBackColor = RGB(45, 0, 253)  

' Sets the background color of the PropertyGridItems to Yellow  
wndPropertyGrid.ViewForeColor = vbYellow  

' Sets the text color of Category PropertyGridItems to Grey  
wndPropertyGrid.ViewCategoryForeColor = RGB(100, 100, 100)  

' Sets the font used to display text in the PropertyGrid to "Ravie"  
wndPropertyGrid.Font = "Ravie"  

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.