ActiveWindow
API operations for the ActiveWindow of table documents.
ActiveWindow
ActiveWindow
Gets the active window.
-
Syntax
expression.ActiveWindowexpression: the document type application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the active window. const activeWindow = await app.ActiveWindow; }
Properties
ActiveWindow.DisplayGridlines
Gets or sets whether gridlines are displayed in the active window.
-
Syntax
expression.ActiveWindow.DisplayGridlines=Booleanexpression: the document type application object.
Set
Booleantotrueto show gridlines, orfalseto hide them. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Hide gridlines. app.ActiveWindow.DisplayGridlines = false; }
ActiveWindow.DisplayHeadings
Gets or sets whether row and column headings are displayed in the active window.
-
Syntax
expression.ActiveWindow.DisplayHeadings=Booleanexpression: the document type application object.
Set
Booleantotrueto show row and column headings, orfalseto hide them. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Hide row and column headings. app.ActiveWindow.DisplayHeadings = false; }
ActiveWindow.Zoom
Gets or sets the zoom level of the active window as a percentage. The default value is 100, which represents the normal size.
-
Syntax
expression.ActiveWindow.Zoomexpression: the document type application object.
-
Return values
Returns a Number that represents the zoom level of the active window.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the zoom level. The default is 100 (normal size). const zoom = await app.ActiveWindow.Zoom; console.log(zoom); // Set the zoom level. app.ActiveWindow.Zoom = 10; }
ActiveWindow.ScrollColumn
Gets or sets the number of the leftmost column in the active window.
Only JS-SDK V1.1.10 and later support this property.
-
Syntax
expression.ActiveWindow.ScrollColumnexpression: the document type application object.
-
Return values
Returns a
Numberthat represents the number of the leftmost column. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the number of the leftmost column in the active window. const ScrollColumn = await app.ActiveWindow.ScrollColumn; console.log(ScrollColumn); // Set the leftmost column to column 10. app.ActiveWindow.ScrollColumn = 10; }
ActiveWindow.ScrollRow
Gets or sets the number of the row at the top of the active window.
Only JS-SDK V1.1.10 and later support this property.
-
Syntax
expression.ActiveWindow.ScrollRowexpression: the document type application object.
-
Return values
Returns a
Numberthat represents the number of the row at the top of the active window. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the number of the row at the top of the active window. const ScrollRow = await app.ActiveWindow.ScrollRow; console.log(ScrollRow); // Set the topmost row to row 10. app.ActiveWindow.ScrollRow = 10; }
ActiveWindow.VertIndex
Gets or sets the vertical scroll offset of the active window, in pixels.
-
Syntax
expression.ActiveWindow.VertIndexexpression: the document type application object.
-
Return values
Returns a
Numberthat represents the vertical scroll offset. Unit: pixels. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the vertical scroll offset in pixels. const value = await app.ActiveWindow.VertIndex; console.log(value); // Set the vertical scroll offset to 300 pixels. app.ActiveWindow.VertIndex = 300; }
ActiveWindow.HorzIndex
Gets or sets the horizontal scroll offset of the active window, in pixels.
-
Syntax
expression.ActiveWindow.HorzIndexexpression: the document type application object.
-
Return values
Returns a Number that represents the horizontal scroll offset. Unit: pixels.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the horizontal scroll offset in pixels. const value = await app.ActiveWindow.HorzIndex; console.log(value); // Set the horizontal scroll offset to 300 pixels. app.ActiveWindow.HorzIndex = 300; }