TabSheetMeasures.calcColumnsWidth

Syntax

calcColumnsWidth(startColIndex: Number, endColIndex: Number, action: function, context: Object, reverseCalc: Boolean);

Parameters

startColIndex. Index of the column corresponding to range start.

endColIndex. Index of the column corresponding to range end.

action. Function executed at each iteration of columns' total width calculation. This is an optional parameter, by default it is set to Null.

context. Context from which the method is called. This is an optional parameter, by default it equals to the current context of this.

reverseCalc. Characteristic indicating direction of iteration through columns. If the parameter is set to True, the method iterates starting from the range end to its start, if the parameter is set to False, iteration moves from start to the end of range. This is an optional parameter, by default it is set to False.

Description

The calcColumnsWidth method calculates value of total width for table columns within specified range.

Comments

This method returns a Number type value.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Determine total width of table columns in the range A0-C0 and total height of the rows in the range A0-A2:

// Get table dimensions
var measures = tabSheet.getMeasures();
// Get value of column total width in the range A0-C0
var columnsWidth = measures.calcColumnsWidth(0, 2);
console.log("Total width of columns in the range A0-C0: " + columnsWidth);
// Get value of row total height in the range A0-A2
var rowsHeight = measures.calcRowsHeight(0, 2);
console.log("Total height of rows in the range A0-A3: " + rowsHeight);

After executing the example the browser console chows values of total width for table columns in the range A0-B2 and total height of the rows in the range A0-A2:

Total width of columns in the range A0-C0: 300

Total height of rows in the range A0-A3: 150

Seebsp;also:

TabSheetMeasures