property Property.CellBackColor([Index as Variant]) as Color
Specifies the cell's background color.

 TypeDescription 
   Index as Variant A long expression that indicates the column's index. Valid values are: 0 for "Name" column, and 1 for "Value" column.  
   Color A color expression that specifies the cell's background color.   

Use the CellBackColor property to change the cell's foreground color. Use the BackColor property to change the foreground color for the entire property. Use the CellForeColor property to change the cell's foreground color.

 The following sample changes the background/foreground color for the Border's value:

Private Sub Form_Load()
With PropertiesList1
    .BeginUpdate
        .Add "Appearance", "", ReadOnly
        With .Add("Border", 0, EditEnum, , "Appearance")
            .AddValue 0, "0 - None"
            .AddValue 1, "1 - Fixed"
            
            .CellBackColor(1) = vbRed
            .CellForeColor(1) = vbWhite
        End With
        .Refresh
    .EndUpdate
End With
End Sub
 

Send comments on this topic.
1999-2015 Exontrol.COM, Software. All rights reserved.