getCellWidth

getCellWidth(): Integer;

The getCellWidth method of the JadeTableCell class returns the logical width of the cell in pixels.

For a merged cell where the mergeCells property is set to the MergeCells_MergeSelectable (2) or MergeCells_Merge (1) value, the width is the size after the merging process.

For a cell that is hidden by the merge process, this method returns zero (0).

For a non-merged cell, this method returns the same value as the Table control class columnWidth property of the cell.

The following example, which ensures that a merged cell is always totally displayed, shows the use of the getCellWidth method.

// If the first cell is a hidden cell of the merge, move the table
// to the start of a merged cell
while table1.leftColumn > 2 and table1.accessCell(table1.row,
                 table1.leftColumn).getCellWidth = 0 do
    table1.leftColumn := table1.leftColumn - 1;
endwhile;

See also the JadeTableCell class mergeCells property.