SetCellFont

Change the font of an individual cell

WTSupported in traditional Synergy on Windows

 

 

 

status = %AX_CALL(axlist_id, "SetCellFont", row, column, face_name, point_size, 
&       rendition)

Return value

status

Returns true if successful, otherwise false. (n)

Arguments

axlist_id

The ID for the ActiveX Toolkit list. This ID can be retrieved with L_STATUS. (n)

row

The row number of the cell whose font is being modified. (n)

column

The column number of the cell whose font is being modified. (n)

face_name

The name of the Windows font. (a)

point_size

The size of the Windows font in points. (n)

rendition

Zero to turn off all renditions, or one or more of the following options, which can be combined using .BOR. or the vertical bar (|) operator: D_CELL_BOLD, D_CELL_ITALIC, D_CELL_UNDER (underlined). (n)

Discussion

The SetCellFont method sets the font and rendition for a specified cell. The specified font overrides any font and point size specified by the FontName and FontSize properties, and any font and renditions specified in the window script. It does not override font and renditions specified by I_FLDMOD.

See also

Examples

In the following example, the text in the fourth column of the current item is set to underline and bold. This does not affect any other font settings.

xcall l_status(listid, D_LAXCTRL, axctrl, D_LCURITM, curr)
xcall ax_call(axctrl, "GetCellFont", curr, 4, fontname, ptsize, style)
xcall ax_call(axctrl, "SetCellFont", curr, 4, %atrim(fontname), ptsize,
 &           (style .bor. D_CELL_BOLD .bor. D_CELL_UNDER))

The following example turns off italic for the text in the second column of the current item without affecting any other font settings.

xcall l_status(listid, D_LAXCTRL, axctrl, D_LCURITM, curr)
xcall ax_call(axctrl, "GetCellFont", curr, 2, fontname, ptsize, style)
xcall ax_call(axctrl, "SetCellFont", curr, 2, %atrim(fontname), ptsize,
 &           (style .band. (.bnot. D_CELL_ITALIC)))