.. highlightlang:: us .. _tableaddfont: TableAddFont ============ .. index:: TableAddFont .. us.tag TableAddFont table.fonts New400 :ref:`TableAddFont` adds a font to font list of a table object. .. function:: nFontIndex = TableAddFont(hTable, hFont) .. us.return **Return Value** *nFontIndex* is the index of the font in font list. The index is used to set the font for the specified cells using the :ref:`TableSetFontIndex` function. .. us.params **Parameters** .. uparam:: hTable Identifies the table object. .. uparam:: hFont *hFont* is the handle of a font object created with :ref:`FontCreate`. .. us.example **Example** In the following example a new font is created, added to the font list, and used to display the cell text of the first row. :: hFont = FontDialog(); idx = TableAddFont(hTable, hFont); FontDestroy(hFont); rvSize = TableGetSize(hTable); rmIndex = zeros(1, rvSize[2]) + idx; rvSel = [1, 1, rvSize[2], 1]; TableSetFontIndex(hTable, rmIndex, rvSel); .. seealso:: :ref:`overview-table`, :ref:`TableGetFontList`, :ref:`TableGetFontIndex`, :ref:`TableSetFontIndex` :sub:`id-1855002`