.. highlightlang:: us .. index:: TableSetBorderPenIndex .. _tablesetborderpenindex: TableSetBorderPenIndex ====================== .. us.tag TableSetBorderPenIndex table.pens New400 :ref:`TableSetBorderPenIndex` sets the pen index that is used to draw the border. Every cell is enclosed by 4 border lines. .. function:: bool = TableSetBorderPenIndex(hTable, rmPenIndex, bHorz) bool = TableSetBorderPenIndex(hTable, rmPenIndex, bHorz, 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 *hTable* is the table obect handle created with :ref:`TableCreate`. .. uparam:: rmPenIndex *rmPenIndex* is a matrix with pen indices which will be used to draw the horizontal and vertical border lines. If *bHorz* is TRUE (1) the matrix must have one row more than the table or the selection specified in *rvSel*. If *bHorz* is FALSE (0) the matrix must have one column more than the table or the selection specified in *rvSel*. If the cell value is 0 no border line is drawn. .. uparam:: bHorz If *bHorz* is TRUE (1) the pens for the horizontal lines are set. If *bHorz* is FALSE (0) the pens for the vertical lines are set. .. uparam:: rvSel *rvSel* is a vector with four elements, which specify the selection: .. 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 cell enumeration starts with 1. .. seealso:: :ref:`overview-table`, :ref:`TableAddPen`, :ref:`TableGetBorderPenIndex` :sub:`id-14989`