Color Property
Description
Gets/Sets the font color selected in the color drop-down list in the Font Chooser dialog.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property Color() As ULong
Remarks
This property MUST be manually set before the font dialog can be used to edit the font color. It will be disabled until this property is set.
Example
This sample illustrates how to set the color property of a PropertyGridItem of type font.
Dim Category As PropertyGridItem
Dim Item As PropertyGridItem
Set Category = wndPropertyGrid.AddCategory("Items")
' Adds a PropertyGridItem that will display the currently selected font, a
' button is added to the item that will display a Font Chooser dialog when clicked
Set Item = Category.AddChildItem(PropertyItemFont, "FontItem", Me.Font)
' The color property must manually be set to enable the color property to be selected in the
' Font Chooser dialog; this must be done even if you are setting the color to black
Item.Color = vbRed
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.