Click or drag to resize

DataColumn.ChangeBackground Method (Typed)

X#
Set a new background brush for this data column.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD ChangeBackground(
	oBrush AS Brush,
	kWhere AS LONG
) AS Brush
Request Example View Source

Parameters

oBrush
Type: Brush
The new background brush to be used.
kWhere
Type: Long
Indicates what part of the data column should be repainted, specified as one of the following constants:
ConstantDescription
GBLCOLCAPTIONThe column caption area.
GBLHITEXTHighlighted (selected) text in the data area.
GBLTEXTText in the data display area. This is the default.

Return Value

Type: Brush
The brush previously assigned to the changed area.
Remarks
The setting specified here supersedes, for this data column, the setting set in this data column's owner data browser. Although the button and caption area can be specified, the method refers only to this column. As a rule, initial settings are picked up from the standard settings of the environment—under Windows, colors are set in the Control Panel. Note that while it is possible to alter the color of the caption and column caption areas, this is not recommended when a 3-dimensional, sculpted, "button look" is used—end users can be confused if buttons don't look like buttons.
Examples
To set the background of the text area yellow and column caption blue:
X#
1oDataColumn:ChangeBackground(Brush{Color{COLORYELLOW}},    GBLTEXT)
2oDataColumn:ChangeBackground(Brush{Color{COLORBLUE}},GBLCOLCAPTION)
See Also