TBrowse() > Display methods xHarbour Developers Network  

oTBrowse:colorRect()

Changes the color of a group of cells in the browse display.

Syntax

:colorRect( <aTLBR>, <aColorIndex> ) --> self

Arguments

<aTLBR> := { <nTop>, <nLeft>, <nBottom>, <nRight> }
This is an array holding four numeric values. They specify the ordinal positions of the data rows and columns of a rectangular area in the browse display whose color should be changed.
<aColorIndex> := { <nNormal>, <nHighlight> }
This is an array holding two numeric values. They specify the color values of the color string held in :colorSpec to use for display. The first element points to the color value for normal display and the second element indicates the color for highlighting a cell, or the browse cursor, respectively.

Description

Method :colorRect() can be used to change the color of a rectangular area within the data rows of the browse display. This area is defined using ordinal positions of data rows and columns, not screen coordinates. The top and bottom borders of the rectangle must be specified as ordinal row positions in the range from 1 to :rowCount, and the left and right borders are ordinal column positions ranging from 1 to :colCount.

The two array elements of <aColorIndex> point to color values of the color string held in :colorSpec. The first element selects the color for normal display while the second determines the color for the browse cursor when it is moved into the rectangular area <aTLBR>.

When the colored area is scrolled vertically outside the browse display, the cells in this area do not retain the changed color.


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe