.. highlightlang:: us .. _tablesetattrib: TableSetAttrib ============== .. index:: TableSetAttrib .. us.tag TableSetAttrib table.get New400 :ref:`TableSetAttrib` sets the cell attributes. .. function:: bool = TableSetAttrib(hTable, rmAttrib) bool = TableSetAttrib(hTable, rmAttrib, rvSel) .. us.return **Return Value** If the function succeeds, the return value *bool* is TRUE (1); otherwise it is FALSE (0). }return] .. us.params **Parameters** .. uparam:: hTable Identifies the table object. .. uparam:: rmAttrib *rmAttrib* is a matrix with attribute values. Each element can be a combination of the following values: .. list-table:: :header-rows: 1 * - Value - Meaning * - TABLE_CLIPTEXT - Clipt text at the cell edge * - TABLE_AUTOSIZE_WIDTH - Calculate the cell width automatically * - TABLE_AUTOSIZE_HEIGHT - Calculate the cell height automatically * - TABLE_WORDWRAP - Word Wrap at blank characters. * - TABLE_SHRINKFONT - Shrinks the font size to fit the horizontal cell size. .. 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. In the following example clipping is disabled for all cells: :: rmAttrib = TableSetAttrib(hTable); rmAttrib = rmAttrib & ~TABLE_CLIPTEXT; TableSetAttrib(hTable, rmAttrib); In the following example autosize is enabled for all cells: :: rmAttrib = TableSetAttrib(hTable); rmAttrib = rmAttrib | (TABLE_AUTOSIZE_WIDTH | TABLE_AUTOSIZE_HEIGHT); TableSetAttrib(hTable, rmAttrib); .. seealso:: :ref:`overview-table`, :ref:`TableGetAttrib`, :ref:`TableGetAlign` :sub:`id-1076107`