SelectedItemBackColor, SelectedItemForeColor

These properties determine the colors used for the items currently highlighted in a list or combo box.

Usage

oObject.SelectedItemBackColor = nBackColor
nBackColor = oObject.SelectedItemBackColor
oObject.SelectedItemForeColor = nForeColor
nForeColor = oObject.SelectedItemForeColor
These colors are used for whatever's currently highlighted in the list or combo box. In a list box with multi-select, all the highlighted items use these colors.In a combo box, these colors apply only to the drop-down portion. The part that's always visible uses BackColor and ForeColor (or, when selected, SelectedBackColor and SelectedForeColor).

Example

ThisForm.lstFriends.SelectedItemBackColor = RGB(0,0,255)
ThisForm.lstFriends.SelectedItemForeColor = RGB(255,255,255)

See Also

BackColor, ForeColor, ItemBackColor, ItemForeColor, SelectedBackColor, SelectedForeColor


Back to Table of Contents

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