.. highlightlang:: us .. index:: TableSetFontIndex .. _tablesetfontindex: TableSetFontIndex ================= .. us.tag TableSetFontIndex table.fonts New400 :ref:`TableSetFontIndex` sets the font index. .. function:: bool = TableSetFontIndex(hTable, rmFontIndex) bool = TableSetFontIndex(hTable, rmFontIndex, rvSel) .. us.return **Return Value** If the function succeeds, the return value *bool* is TRUE (1); otherwise it is FALSE (0). .. us.params **Parameters** .. uparam:: hTable Identifies the table object. .. uparam:: rmfontIndex *rmFontIndex* is a matrix with font indices. The index is the number in the font table of the table object. To get the font array call :ref:`TableGetFontList`. .. uparam:: rvSel *rvSel* is a vector with four elements specifying a range of rows and columns: .. list-table:: :header-rows: 1 * - Element - Description * - rvSel[1] - Left column of selection * - rvSel[2] - Top row of selection * - rvSel[3] - Right column of selection * - rvSel[4] - Bottom row of selection The column and row numbering starts with 1. Left is smaller than right and top is smaller than bottom. .. us.example **Example** :: def Table_SetFontColor(hTable, nRow, nColumn, rvRGB) { rmFontIndex = TableGetFontIndex(hTable); hvFont = TableGetFontList(hTable); FontSetColorRGB(hvFont[rmFontIndex[nRow;nColumn]], rvRGB); nFontIndex = TableAddFont(hTable, hvFont[rmFontIndex[nRow;nColumn]]); rmFontIndex[nRow;nColumn] = nFontIndex; TableSetFontIndex(hTable, rmFontIndex); FontDestroyArray(hvFont); } Table_SetFontColor(21, 3, 1, [255,127,0]) .. seealso:: :ref:`overview-table`, :ref:`TableGetFontList`, :ref:`TableGetFontIndex`, :ref:`TableAddFont` :sub:`id-488022`