Gets or sets whether colors in the grid are derived from the host (in conjunction with Settings) or the control's own color properties.
object.UseHostColors = [boolean]
The default setting for this property is True.
When set to True, the colors assigned to the grid will be derived only from the host grid's colors and the color translations specified in Settings | Display Settings, any color-related properties specified for the grid will be ignored.
When set to False, colors specified in the various color properties of the grid will be assigned to all cells of the grid, regardless of the underlying host colors of individual cells. The default settings for the color properties are derived from Display Settings but turning this property off allows you to override those Settings.
This property is particularly relevant if you have a host grid containing cells which are a different color to the rest of the grid - perhaps in order to highlight certain values. In this scenario, turning UseHostColors on ensures that the colors in the non-standard cells are respected in the grid. Compare the examples below:
The screen above shows the original subfile sent through from the host. Note the black on green subfile data.
Using newlook's out of the box settings, UseHostColors will be turned on and the screen will be displayed as above.
Turning UseHostColors off in Designer will mean the grid is rendered using the color properties set for the grid, the same screen will now display like this.
When UseHostColors is set to True, then none of the values set in the DataForeColor, DataBackColor, DataAltForeColor, DataAltBackColor, EntryForeColor, EntryBackColor, HeadingForeColor or HeadingBackColor properties will be applied to the grid.
DataForeColor property | DataAltForeColor property | EntryForeColor property | HeadingForeColor property | DataBackColor property | DataAltBackColor property | EntryBackColor property | HeadingBackColor property | UseColors property | Column object | ColumnHeader object | BackColorRepeat property
© 2004-2021 looksoftware. All rights reserved.