TabSheetObject.setLeftOffset

Syntax

setLeftOffset(left: Number, isVirtual: Boolean);

Parameters

left. Left offset in pixels.

isVirtual. Determines whether a virtual or real coordinate is passed. If the parameter is True, a virtual coordinate is passed, otherwise a real one.

Description

The setLeftOffset method sets left offset for an object in the table.

Comments

Left offset is calculated in pixels starting from the table left border.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component), and the TabSheetObject component (see the TabSheetObject Constructor page). Move object to the C1 cell, remove all offsets from its borders:

// Determine coordinates of the C1 cell and its size
var coord = tabSheet.coord(1, 2);
// Get table dimensions
var measures = tabSheet.getMeasures();
// Place an object in the C1 cell
tabSheetObject.setLeftOffset(measures.calcColumnsWidth(0, coord.colIndex));
tabSheetObject.setTopOffset(measures.calcRowsHeight(0, coord.rowIndex));
// Reset offsets from the C1 cell border
tabSheetObject.setTop(0);
tabSheetObject.setLeft(0);
// Rerender table
tabSheet.rerender();

After executing the example the object is placed in the cell under coordinates (1, 2), top and left offset from the cell's top and left border are removed:

See also:

TabSheetObject