.. highlightlang:: us .. _tableaddbrush: TableAddBrush ============= .. index:: TableAddBrush .. us.tag TableAddBrush table.brush New400 :ref:`TableAddBrush` adds a new bush (fill color) to the brush list. .. function:: nBrushIndex = TableAddBrush(hTable, rvColorRGB) .. us.return **Return Value** *nBrushIndex* is the index of added color. .. us.params **Parameters** .. uparam:: hTable Identifies the table object. .. uparam:: rvColorRGB *rvColorRGB* is a vector with 3 elements: .. list-table:: :header-rows: 1 * - Wert - Bedeutung * - rvColorRGB[1] - red in the range of 0 bis 255 * - rvColorRGB[2] - green in the range of 0 bis 255 * - rvColorRGB[3] - blue in the range of 0 bis 255 .. us.example **Example** In the following example a new brush is created, added to the brush list, and used to display the cell text of the first row. :: rvColor = GetColorDialog(); index = TableAddBrush(hTable, rvColor); rvSize = TableGetSize(hTable); rmIndex = zeros(1, rvSize[2]) + index; rvSel = [1, 1, rvSize[2], 1]; TableSetBrushIndex(hTable, rmIndex, rvSel); .. seealso:: :ref:`overview-table`, :ref:`TableGetBrushList`, :ref:`TableGetBrushIndex`, :ref:`TableSetBrushIndex` :sub:`id-849620`