Click or drag to resize

DataBrowser.ChangeBackground Method (Typed)

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

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

Parameters

oBrush
Type: Usual
The new background brush to be used.
kWhere
Type: Long
Indicates what part of the browser should be repainted, specified as one of the following constants:

Return Value

Type: Usual
Remarks
Indicates what part of the browser 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.
The background color can be set for different parts of the data browser as a whole, but not for individual columns. To set the background brush for individual columns, use DataColumn:ChangeBackground(). 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 to yellow and highlighted text to blue:
X#
1oDataBrowser:ChangeBackground(Brush{Color{COLORYELLOW}},GBLTEXT)
2oDataBrowser:ChangeBackground(Brush{Color{COLORBLUE}},GBLHITEXT)
See Also