Grid.SetCellFont

Grid.SetCellFont (

string ObjectName,

number Row,

number Column,

table FontData = nil,

boolean Redraw = true )

Description

Sets the font of a cell in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

FontData

(table) A table of font information. Pass nil to use the default grid font. This is an optional argument and if omitted will default to nil. All values are optional and if omitted, the default will be used.

KEY

TYPE

DESCRIPTION

FaceName

string

The face name such as "Arial" or "Verdana".

Height

number

The font height (in points).

Weight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT

VALUE

DESCRIPTION

FW_DONTCARE

0

Font weight not specified.

FW_THIN

100

Font weight 'thin'.

FW_EXTRALIGHT

200

Font weight 'extra-light'.

FW_LIGHT

300

Font weight 'light'.

FW_NORMAL

400

Font weight 'normal'.

FW_MEDIUM

500

Font weight 'medium'.

FW_SEMIBOLD

600

Font weight 'semi-bold'.

FW_BOLD

700

Font weight 'bold'.

FW_EXTRABOLD

800

Font weight 'extra bold'.

FW_HEAVY

900

Font weight 'heavy'.

Italic

boolean

True if the font should be set to italic, false if it should not be.

Underline

boolean

True if the it should be underlined, false if it should not be.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE

DESCRIPTION

true

Automatically redraw the grid after the operation. (Default)

false

Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

See also: Related Actions