ItemBackColor, ItemForeColor

These properties determine the color of items in a list box or combo box.

Usage

oObject.ItemBackColor = nBackColor
nBackColor = oObject.ItemBackColor
oObject.ItemForeColor = nForeColor
nForeColor = oObject.ItemForeColor
In a combo box, these properties determine colors only for the items in the drop-down part of the combo. The color of the text box part that's always visible is determined by BackColor and ForeColor (and SelectedBackColor and SelectedForeColor, when some text is highlighted).For both combos and lists, SelectedItemBackColor and SelectedItemForeColor determine the color of the highlighted item or items.

Example

ThisForm.cboMyCombo.ItemBackColor = RGB(255,0,255)
ThisForm.cboMyCombo.ItemForeColor = RGB(255,255,255)

See Also

BackColor, DisabledItemBackColor, DisabledItemForeColor, ForeColor, SelectedItemBackColor, SelectedItemForeColor


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .