CGridView:SetFontColor


The SetFontColor method sets the text color of a CGridView cell. Also see SetBkColor. Use this method to highlight a cell. This method overrides the initial grid property defined by the values of GridParams.sBodyFace and GridParams.sHdgFace.

Syntax

CGridView:SetFontColor( nCol, nRow, strRGB )

bullet.gif    Where nCol and nRow are the column and row location of the cell.

bullet.gif    strRGB is a string specifying the R,G,B components of the color. Each color component is in the range 0 through 255. For example, "0,0,0" is black and "255,255,255" is white.

Example

The following script sets both the text and background color of the cell at column 4, row 2 to white text on a green background:

G = attachlist_gridview()

-- attach an existing grid window

G:SetFontColor( 4, 2, "255,255,255")

-- set the text color at column 4, row 2

G:SetBkColor( 4, 2, "0,127,0")

-- set the background color at column 4, row 2

Related Topics

CGridView class

SetBkColor


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.