Skip to content

ViewForeColor Property

Description

Gets/Sets the view forecolor for the property grid. This is the foreground color of the property grid items.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property ViewForeColor() As ULong

Example

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

PropertyGrid Control


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