Method TBrowse():colorRect() Foundation

Changes color in a rectangular cell area.

Syntax
:colorRect( <aTLBR>, <aColorIndex> ) --> self
Parameters
<aTLBR>
<aTLBR> is an array containing four numeric coordinates. These values represent the top, left, bottom and right row and column where color of cells is to change.
<aColorIndex>
<aColorIndex> is an array with two numerical values which serve as indexes into the list of color values contained in the instance variable :colorSpec. The first index indicates which value to use to color the rectangular area. The second index indicates which color to use when the browse cursor moves into the rectangular area.
Return

:colorRect() returns a reference to the TBrowse object.

Description

:colorRect() changes the color of cells in a rectangular area within the data rows of the TBrowse object. Two arrays must be passed as arguments. The first array<aTLBR> contains four numeric values (nTop, nLeft, nBottom, nRight), which define the rectangular area within the data rows that should change color. Since the rectangular area is associated with particular rows and columns of the TBrowse itself and not particular screen coordinates, this means that columns that are not visible can be affected by the values in this array. The second array <aColorIndex> contains two numerical values which serve as indexes into the color table stored in the instance variable :colorSpec. The first element indicates which value in the color table should be used to display the rectangular area. The second element determines which color should be used to display the browse cursor when it moves into the rectangular area. Since a rectangle can be defined that includes columns that are not currently visible, new columns that appear when scrolling horizontally will be displayed in the changed color. Cells that scroll vertically do not retain their new color once they have scrolled out of view.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.